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

Merge pull request 'OZG-3880 network-policy add incoming from vorgangmanager,...

Merge pull request 'OZG-3880 network-policy add incoming from vorgangmanager, add additionalRules' (#97) from OZG-3880-add-incoming-network-policy-vorgang-manager into master

Reviewed-on: https://git.ozg-sh.de/ozgcloud-app/user-manager/pulls/97
parents c0297900 db301177
Branches
Tags
No related merge requests found
...@@ -37,9 +37,14 @@ spec: ...@@ -37,9 +37,14 @@ spec:
ingress: ingress:
- ports: - ports:
- port: 8080 - port: 8080
- ports:
- port: 9090
from:
- podSelector:
matchLabels:
component: vorgang-manager
{{- with (.Values.networkPolicy).additionalIngressConfig }} {{- with (.Values.networkPolicy).additionalIngressConfig }}
- from: {{ toYaml . | indent 2 }}
{{ toYaml . | indent 8 }}
{{- end }} {{- end }}
egress: egress:
- to: - to:
...@@ -66,5 +71,9 @@ spec: ...@@ -66,5 +71,9 @@ spec:
protocol: UDP protocol: UDP
- port: 5353 - port: 5353
protocol: TCP protocol: TCP
{{- with (.Values.networkPolicy).additionalEgressConfig }}
{{ toYaml . | indent 2 }}
{{- end }}
{{- end }} {{- end }}
...@@ -61,6 +61,12 @@ tests: ...@@ -61,6 +61,12 @@ tests:
ingress: ingress:
- ports: - ports:
- port: 8080 - port: 8080
- ports:
- port: 9090
from:
- podSelector:
matchLabels:
component: vorgang-manager
egress: egress:
- to: - to:
- podSelector: - podSelector:
...@@ -86,26 +92,43 @@ tests: ...@@ -86,26 +92,43 @@ tests:
protocol: UDP protocol: UDP
- port: 5353 - port: 5353
protocol: TCP protocol: TCP
- it: add ingress rule by values - it: add ingress rule by values
set: set:
networkPolicy: networkPolicy:
ssoPublicIp: 51.89.117.53/32 ssoPublicIp: 51.89.117.53/32
dnsServerNamespace: test-namespace-dns dnsServerNamespace: test-namespace-dns
additionalIngressConfig: additionalIngressConfig:
- from:
- podSelector: - podSelector:
matchLabels: matchLabels:
component: client2 component: client2
asserts: asserts:
- equal: - contains:
path: spec.ingress path: spec.ingress
value: content:
- ports: from:
- port: 8080
- from:
- podSelector: - podSelector:
matchLabels: matchLabels:
component: client2 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 - it: test network policy disabled
set: set:
networkPolicy: networkPolicy:
...@@ -114,7 +137,7 @@ tests: ...@@ -114,7 +137,7 @@ tests:
- hasDocuments: - hasDocuments:
count: 0 count: 0
- it: test network policy unset should be disabled - it: should generate network policies on disabled:false
set: set:
networkPolicy: networkPolicy:
disabled: false disabled: false
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment