chore(add-ons): Add network policies to operators and monitoring

This commit is contained in:
2026-10-28 15:27:26 +05:30
parent 49ee2a29f5
commit e4346af5ba
8 changed files with 181 additions and 16 deletions
+41
View File
@@ -0,0 +1,41 @@
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
name: cnpg
namespace: cnpg-system
spec:
egress:
- ports:
- port: 53
protocol: UDP
- port: 53
protocol: TCP
to:
- namespaceSelector:
matchLabels:
kubernetes.io/metadata.name: kube-system
podSelector:
matchLabels:
k8s-app: kube-dns
- ports:
- port: 6443
protocol: TCP
- ports:
- port: 8000
protocol: TCP
to:
- namespaceSelector: {}
podSelector:
matchExpressions:
- key: cnpg.io/cluster
operator: Exists
ingress:
- ports:
- port: 9443
protocol: TCP
podSelector:
matchLabels:
app.kubernetes.io/name: cloudnative-pg
policyTypes:
- Ingress
- Egress