Skip to content

Commit 416021f

Browse files
committed
specify namespace with selectors
1 parent 61b47ec commit 416021f

File tree

1 file changed

+17
-8
lines changed

1 file changed

+17
-8
lines changed

deploy/chart/templates/0000_50_olm_01-networkpolicies.yaml

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ spec:
5252
- protocol: TCP
5353
port: 6443 # kube-api server
5454
- protocol: TCP
55-
port: 50051 # catalog service
55+
port: 50051 # registry pods' service port
5656
- protocol: TCP
5757
port: 53 # DNS
5858
- protocol: UDP
@@ -75,13 +75,22 @@ spec:
7575
- protocol: TCP
7676
port: {{ .Values.package.service.internalPort }}
7777
egress:
78-
- ports:
79-
- protocol: TCP
80-
port: 50051 # catalog service
81-
- protocol: TCP
82-
port: 53 # DNS
83-
- protocol: UDP
84-
port: 53 # DNS
78+
- to:
79+
- namespaceSelector:
80+
matchLabels:
81+
kubernetes.io/metadata.name: {{ .Values.catalog_namespace }} # For registry resolution
82+
ports:
83+
- protocol: TCP
84+
port: 50051 # registry pods' service port
85+
- to:
86+
- namespaceSelector:
87+
matchLabels:
88+
kubernetes.io/metadata.name: kube-system # For DNS resolution (CoreDNS runs here)
89+
ports:
90+
- protocol: UDP
91+
port: 53 # DNS
92+
- protocol: TCP
93+
port: 53 # DNS
8594
policyTypes:
8695
- Ingress
8796
- Egress

0 commit comments

Comments
 (0)