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

OZG-4455 add egress network policy option

parent 48e579cc
Branches
Tags
No related merge requests found
......@@ -89,4 +89,9 @@ spec:
- ipBlock:
cidr: {{ required "ozgcloud.bayernid.cidr muss angegeben sein" ((.Values.ozgcloud).bayernid).cidr }}
{{- end }}
{{- with (.Values.networkPolicy).additionalEgressConfig }}
{{ toYaml . | indent 2 }}
{{- end }}
{{- end }}
\ No newline at end of file
......@@ -148,6 +148,38 @@ tests:
- ipBlock:
cidr: 2.3.4.5/1
- it: add egress rules by values
set:
networkPolicy:
additionalEgressConfig:
- to:
- ipBlock:
cidr: 1.1.1.1/32
- to:
- podSelector:
matchLabels:
component: ozg-mongodb
ports:
- port: 27017
protocol: TCP
asserts:
- contains:
path: spec.egress
content:
to:
- ipBlock:
cidr: 1.1.1.1/32
- contains:
path: spec.egress
content:
to:
- podSelector:
matchLabels:
component: ozg-mongodb
ports:
- port: 27017
protocol: TCP
- 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