diff --git a/src/main/helm/templates/network_policy.yaml b/src/main/helm/templates/network_policy.yaml index 3a2045292173271285a04bd1f440a249c2d4b321..1f2f9e15f26f38f39b91143e9e2801c794c6f0a6 100644 --- a/src/main/helm/templates/network_policy.yaml +++ b/src/main/helm/templates/network_policy.yaml @@ -71,6 +71,14 @@ spec: ports: - port: 9090 protocol: TCP + - to: + - namespaceSelector: {} + podSelector: + matchLabels: + component: vorgang-manager + ports: + - port: 9090 + protocol: TCP {{- end }} {{- end }} \ No newline at end of file diff --git a/src/test/helm/network_policy_test.yaml b/src/test/helm/network_policy_test.yaml index 94e663a873ed9d337f5daa395f1e153f2015354c..9ef5c98f73dbc6764fb116a38c5f9209234d775e 100644 --- a/src/test/helm/network_policy_test.yaml +++ b/src/test/helm/network_policy_test.yaml @@ -126,7 +126,7 @@ tests: count: 1 - - it: should add zufi rule when zufi-routing is enabled + - it: should add zufi rules when zufi-routing is enabled set: networkPolicy: dnsServerNamespace: test-dns-server-namespace @@ -148,6 +148,17 @@ tests: ports: - port: 9090 protocol: TCP + - contains: + path: spec.egress + content: + to: + - namespaceSelector: {} + podSelector: + matchLabels: + component: vorgang-manager + ports: + - port: 9090 + protocol: TCP - it: should throw error when zufi is enabled but zufi namespace not set set: @@ -176,4 +187,15 @@ tests: kubernetes.io/metadata.name: zufi-namespace podSelector: matchLabels: - component: zufi-server \ No newline at end of file + component: zufi-server + - notContains: + path: spec.egress + content: + to: + - namespaceSelector: {} + podSelector: + matchLabels: + component: vorgang-manager + ports: + - port: 9090 + protocol: TCP \ No newline at end of file diff --git a/xta-adapter/src/main/helm/templates/network_policy.yaml b/xta-adapter/src/main/helm/templates/network_policy.yaml index c1864c568f0a04671e1ae5a2c6cd7b8869a2194d..ff1ebff546dae5ea3eeecf224e1652a6ab929091 100644 --- a/xta-adapter/src/main/helm/templates/network_policy.yaml +++ b/xta-adapter/src/main/helm/templates/network_policy.yaml @@ -78,6 +78,14 @@ spec: ports: - port: 9090 protocol: TCP + - to: + - namespaceSelector: {} + podSelector: + matchLabels: + component: vorgang-manager + ports: + - port: 9090 + protocol: TCP {{- end }} {{- with (.Values.networkPolicy).additionalEgressConfigLocal }} diff --git a/xta-adapter/src/test/helm/network_policy_test.yaml b/xta-adapter/src/test/helm/network_policy_test.yaml index 290ac0f7080f2225f9c3e60cc53bcf9fbb940ef9..863e8c70f6ae138eb7cbe584bf8c374504f99a49 100644 --- a/xta-adapter/src/test/helm/network_policy_test.yaml +++ b/xta-adapter/src/test/helm/network_policy_test.yaml @@ -164,7 +164,7 @@ tests: - hasDocuments: count: 1 - - it: should add zufi rule when zufi-routing is enabled + - it: should add zufi rules when zufi-routing is enabled set: networkPolicy: dnsServerNamespace: test-dns-server-namespace @@ -186,7 +186,18 @@ tests: ports: - port: 9090 protocol: TCP - + - contains: + path: spec.egress + content: + to: + - namespaceSelector: {} + podSelector: + matchLabels: + component: vorgang-manager + ports: + - port: 9090 + protocol: TCP + - it: should throw error when zufi is enabled but zufi namespace not set set: networkPolicy: @@ -215,3 +226,14 @@ tests: podSelector: matchLabels: component: zufi-server + - notContains: + path: spec.egress + content: + to: + - namespaceSelector: {} + podSelector: + matchLabels: + component: vorgang-manager + ports: + - port: 9090 + protocol: TCP