Skip to content
Snippets Groups Projects
Commit dbbce84d authored by Bastian's avatar Bastian
Browse files

OZG-6354 add zentraler eingang networkpolicy

parent acde02da
No related branches found
No related tags found
1 merge request!1Ozg 6354 zentraler eingangmanager networkpolicy
...@@ -73,6 +73,20 @@ spec: ...@@ -73,6 +73,20 @@ spec:
ports: ports:
- protocol: TCP - protocol: TCP
port: 8081 port: 8081
- from:
- namespaceSelector:
matchLabels:
kubernetes.io/metadata.name: {{ required "networkPolicy.zentralerEingangNamespace must be set" (.Values.networkPolicy).zentralerEingangNamespace }}
podSelector:
matchExpressions:
- key: ozg-component
operator: In
values:
- eingangsadapter
- xta-adapter
ports:
- protocol: TCP
port: 9090
{{- with (.Values.networkPolicy).additionalIngressConfigLocal }} {{- with (.Values.networkPolicy).additionalIngressConfigLocal }}
{{ toYaml . | indent 2 }} {{ toYaml . | indent 2 }}
{{- end }} {{- end }}
......
...@@ -39,3 +39,6 @@ database: ...@@ -39,3 +39,6 @@ database:
secretName: "ozg-mongodb-admin-zufi-manager-user" secretName: "ozg-mongodb-admin-zufi-manager-user"
tls: tls:
secretName: "ozg-mongodb-tls-cert" secretName: "ozg-mongodb-tls-cert"
networkPolicy:
zentralerEingangNamespace:
\ No newline at end of file
...@@ -35,6 +35,7 @@ tests: ...@@ -35,6 +35,7 @@ tests:
networkPolicy: networkPolicy:
dnsServerNamespace: test-ns dnsServerNamespace: test-ns
fachstellenProxyNamespace: fachstellen-proxy fachstellenProxyNamespace: fachstellen-proxy
zentralerEingangNamespace: zentraler-eingang
asserts: asserts:
- isAPIVersion: - isAPIVersion:
of: networking.k8s.io/v1 of: networking.k8s.io/v1
...@@ -43,6 +44,7 @@ tests: ...@@ -43,6 +44,7 @@ tests:
networkPolicy: networkPolicy:
dnsServerNamespace: test-ns dnsServerNamespace: test-ns
fachstellenProxyNamespace: fachstellen-proxy fachstellenProxyNamespace: fachstellen-proxy
zentralerEingangNamespace: zentraler-eingang
asserts: asserts:
- isKind: - isKind:
of: NetworkPolicy of: NetworkPolicy
...@@ -51,6 +53,7 @@ tests: ...@@ -51,6 +53,7 @@ tests:
networkPolicy: networkPolicy:
dnsServerNamespace: test-ns dnsServerNamespace: test-ns
fachstellenProxyNamespace: fachstellen-proxy fachstellenProxyNamespace: fachstellen-proxy
zentralerEingangNamespace: zentraler-eingang
asserts: asserts:
- equal: - equal:
path: metadata path: metadata
...@@ -63,6 +66,7 @@ tests: ...@@ -63,6 +66,7 @@ tests:
networkPolicy: networkPolicy:
dnsServerNamespace: test-ns dnsServerNamespace: test-ns
fachstellenProxyNamespace: fachstellen-proxy fachstellenProxyNamespace: fachstellen-proxy
zentralerEingangNamespace: zentraler-eingang
asserts: asserts:
- equal: - equal:
path: spec path: spec
...@@ -126,6 +130,20 @@ tests: ...@@ -126,6 +130,20 @@ tests:
ports: ports:
- protocol: TCP - protocol: TCP
port: 8081 port: 8081
- from:
- namespaceSelector:
matchLabels:
kubernetes.io/metadata.name: zentraler-eingang
podSelector:
matchExpressions:
- key: ozg-component
operator: In
values:
- eingangsadapter
- xta-adapter
ports:
- protocol: TCP
port: 9090
podSelector: podSelector:
matchLabels: matchLabels:
component: zufi-server component: zufi-server
...@@ -138,6 +156,7 @@ tests: ...@@ -138,6 +156,7 @@ tests:
networkPolicy: networkPolicy:
dnsServerNamespace: test-ns dnsServerNamespace: test-ns
fachstellenProxyNamespace: fachstellen-proxy fachstellenProxyNamespace: fachstellen-proxy
zentralerEingangNamespace: zentraler-eingang
monitoringNamespace: test-monitoring monitoringNamespace: test-monitoring
asserts: asserts:
- contains: - contains:
...@@ -156,6 +175,7 @@ tests: ...@@ -156,6 +175,7 @@ tests:
networkPolicy: networkPolicy:
dnsServerNamespace: test-ns dnsServerNamespace: test-ns
fachstellenProxyNamespace: fachstellen-proxy fachstellenProxyNamespace: fachstellen-proxy
zentralerEingangNamespace: zentraler-eingang
additionalIngressConfigLocal: additionalIngressConfigLocal:
- from: - from:
- podSelector: - podSelector:
...@@ -174,6 +194,7 @@ tests: ...@@ -174,6 +194,7 @@ tests:
networkPolicy: networkPolicy:
dnsServerNamespace: test-ns dnsServerNamespace: test-ns
fachstellenProxyNamespace: fachstellen-proxy fachstellenProxyNamespace: fachstellen-proxy
zentralerEingangNamespace: zentraler-eingang
additionalIngressConfigGlobal: additionalIngressConfigGlobal:
- from: - from:
- podSelector: - podSelector:
...@@ -193,6 +214,7 @@ tests: ...@@ -193,6 +214,7 @@ tests:
networkPolicy: networkPolicy:
dnsServerNamespace: test-ns dnsServerNamespace: test-ns
fachstellenProxyNamespace: fachstellen-proxy fachstellenProxyNamespace: fachstellen-proxy
zentralerEingangNamespace: zentraler-eingang
additionalEgressConfigLocal: additionalEgressConfigLocal:
- to: - to:
- ipBlock: - ipBlock:
...@@ -209,6 +231,7 @@ tests: ...@@ -209,6 +231,7 @@ tests:
networkPolicy: networkPolicy:
dnsServerNamespace: test-ns dnsServerNamespace: test-ns
fachstellenProxyNamespace: fachstellen-proxy fachstellenProxyNamespace: fachstellen-proxy
zentralerEingangNamespace: zentraler-eingang
additionalEgressConfigGlobal: additionalEgressConfigGlobal:
- to: - to:
- ipBlock: - ipBlock:
...@@ -233,6 +256,7 @@ tests: ...@@ -233,6 +256,7 @@ tests:
networkPolicy: networkPolicy:
dnsServerNamespace: test-ns dnsServerNamespace: test-ns
fachstellenProxyNamespace: fachstellen-proxy fachstellenProxyNamespace: fachstellen-proxy
zentralerEingangNamespace: zentraler-eingang
asserts: asserts:
- hasDocuments: - hasDocuments:
count: 1 count: 1
...@@ -243,6 +267,7 @@ tests: ...@@ -243,6 +267,7 @@ tests:
disabled: false disabled: false
dnsServerNamespace: test-dns-namespace dnsServerNamespace: test-dns-namespace
fachstellenProxyNamespace: fachstellen-proxy fachstellenProxyNamespace: fachstellen-proxy
zentralerEingangNamespace: zentraler-eingang
asserts: asserts:
- hasDocuments: - hasDocuments:
count: 1 count: 1
...@@ -252,6 +277,7 @@ tests: ...@@ -252,6 +277,7 @@ tests:
networkPolicy: networkPolicy:
disabled: false disabled: false
fachstellenProxyNamespace: fachstellen-proxy fachstellenProxyNamespace: fachstellen-proxy
zentralerEingangNamespace: zentraler-eingang
asserts: asserts:
- failedTemplate: - failedTemplate:
errorMessage: networkPolicy.dnsServerNamespace must be set errorMessage: networkPolicy.dnsServerNamespace must be set
...@@ -260,6 +286,16 @@ tests: ...@@ -260,6 +286,16 @@ tests:
networkPolicy: networkPolicy:
disabled: false disabled: false
dnsServerNamespace: test-dns-namespace dnsServerNamespace: test-dns-namespace
zentralerEingangNamespace: zentraler-eingang
asserts: asserts:
- failedTemplate: - failedTemplate:
errorMessage: networkPolicy.fachstellenProxyNamespace must be set errorMessage: networkPolicy.fachstellenProxyNamespace must be set
- it: test zentralerEingangNamespace namespace must be set message
set:
networkPolicy:
dnsServerNamespace: test-dns-namespace
fachstellenProxyNamespace: fachstellen-proxy
asserts:
- failedTemplate:
errorMessage: networkPolicy.zentralerEingangNamespace must be set
...@@ -46,4 +46,4 @@ oidc: ...@@ -46,4 +46,4 @@ oidc:
networkPolicy: networkPolicy:
dnsServerNamespace: test-ns dnsServerNamespace: test-ns
fachstellenProxyNamespace: proxy fachstellenProxyNamespace: proxy
zentralerEingangNamespace: zentraler-eingang
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment