Skip to content
Snippets Groups Projects
Commit ea283fb0 authored by Felix Reichenbach's avatar Felix Reichenbach
Browse files

OZG-7573 add ingress for vorgang-manager

parent 9abbd562
Branches
Tags
1 merge request!9Ozg 7573 forward vorgang
...@@ -22,12 +22,12 @@ ...@@ -22,12 +22,12 @@
# unter der Lizenz sind dem Lizenztext zu entnehmen. # unter der Lizenz sind dem Lizenztext zu entnehmen.
# #
{{- if not (.Values.networkPolicy).disabled }} {{- if not (.Values.networkPolicy).disabled }}
apiVersion: networking.k8s.io/v1 apiVersion: networking.k8s.io/v1
kind: NetworkPolicy kind: NetworkPolicy
metadata: metadata:
name: network-policy-{{ .Release.Name}} name: network-policy-{{ .Release.Name}}
namespace: {{ .Release.Namespace }} namespace: {{ .Release.Namespace }}
spec: spec:
podSelector: podSelector:
matchLabels: matchLabels:
...@@ -45,9 +45,19 @@ spec: ...@@ -45,9 +45,19 @@ spec:
ports: ports:
- protocol: TCP - protocol: TCP
port: 8081 port: 8081
{{- if (.Values.forwarding).enabled }}
- ports:
- port: 9090
protocol: TCP
from:
- namespaceSelector: {}
podSelector:
matchLabels:
component: vorgang-manager
{{- end }}
egress: egress:
- to: - to:
- podSelector: - podSelector:
matchLabels: matchLabels:
component: vorgang-manager component: vorgang-manager
ports: ports:
...@@ -72,7 +82,7 @@ spec: ...@@ -72,7 +82,7 @@ spec:
- namespaceSelector: - namespaceSelector:
matchLabels: matchLabels:
kubernetes.io/metadata.name: {{ required "routing.zufiManager.namespace must be set if routingStrategy=ZUFI" ((.Values.routing).zufiManager).namespace }} kubernetes.io/metadata.name: {{ required "routing.zufiManager.namespace must be set if routingStrategy=ZUFI" ((.Values.routing).zufiManager).namespace }}
podSelector: podSelector:
matchLabels: matchLabels:
component: zufi-server component: zufi-server
ports: ports:
...@@ -80,7 +90,7 @@ spec: ...@@ -80,7 +90,7 @@ spec:
protocol: TCP protocol: TCP
- to: - to:
- namespaceSelector: {} - namespaceSelector: {}
podSelector: podSelector:
matchLabels: matchLabels:
component: vorgang-manager component: vorgang-manager
ports: ports:
...@@ -88,4 +98,4 @@ spec: ...@@ -88,4 +98,4 @@ spec:
protocol: TCP protocol: TCP
{{- end }} {{- end }}
{{- end }} {{- end }}
\ No newline at end of file \ No newline at end of file
...@@ -222,3 +222,42 @@ tests: ...@@ -222,3 +222,42 @@ tests:
ports: ports:
- port: 9090 - port: 9090
protocol: TCP protocol: TCP
- it: should add ingress from vorgang-manager if forwarding is enabled
set:
networkPolicy:
dnsServerNamespace: test-dns-server-namespace
forwarding:
enabled: true
asserts:
- contains:
path: spec.ingress
content:
from:
- namespaceSelector: {}
podSelector:
matchLabels:
component: vorgang-manager
ports:
- port: 9090
protocol: TCP
- it: should not add ingress from vorgang-manager if forwarding is disabled
set:
networkPolicy:
dnsServerNamespace: test-dns-server-namespace
forwarding:
enabled: false
asserts:
- notContains:
path: spec.ingress
content:
from:
- namespaceSelector: {}
podSelector:
matchLabels:
component: vorgang-manager
ports:
- port: 9090
protocol: TCP
any: true
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment