Skip to content
Snippets Groups Projects
Commit ed13709b authored by OZGCloud's avatar OZGCloud
Browse files

OZG-3880 network- policy add dns egress role for user-manager

parent 143e7841
No related branches found
No related tags found
No related merge requests found
......@@ -15,8 +15,7 @@ spec:
- ports:
- port: 8080
{{- with (.Values.networkPolicy).additionalIngressConfig }}
- from:
{{ toYaml . | indent 8 }}
{{ toYaml . | indent 2 }}
{{- end }}
egress:
- to:
......@@ -43,4 +42,15 @@ spec:
protocol: UDP
- port: 5353
protocol: TCP
- to:
- podSelector:
matchLabels:
component: user-manager
ports:
- port: 9000
protocol: TCP
{{- with (.Values.networkPolicy).additionalEgressConfig }}
{{ toYaml . | indent 2 }}
{{- end }}
{{- end }}
\ No newline at end of file
......@@ -91,26 +91,51 @@ tests:
protocol: UDP
- port: 5353
protocol: TCP
- to:
- podSelector:
matchLabels:
component: user-manager
ports:
- port: 9000
protocol: TCP
- it: add ingress rule by values
set:
networkPolicy:
ssoPublicIp: 1.1.1.1
dnsServerNamespace: kube-system
ssoPublicIp: 51.89.117.53/32
dnsServerNamespace: test-namespace-dns
additionalIngressConfig:
- from:
- podSelector:
matchLabels:
component: client2
asserts:
- equal:
- contains:
path: spec.ingress
value:
- ports:
- port: 8080
- from:
content:
from:
- podSelector:
matchLabels:
component: client2
- it: add egress rules by values
set:
networkPolicy:
ssoPublicIp: 51.89.117.53/32
dnsServerNamespace: test-dns-namespace
additionalEgressConfig:
- to:
- ipBlock:
cidr: 1.2.3.4/32
asserts:
- contains:
path: spec.egress
content:
to:
- ipBlock:
cidr: 1.2.3.4/32
- it: test network policy disabled
set:
networkPolicy:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment