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

Merge pull request 'ozg-6647-network-policy-for-scraper' (#443) from...

Merge pull request 'ozg-6647-network-policy-for-scraper' (#443) from ozg-6647-network-policy-for-scraper into master

Reviewed-on: https://git.ozg-sh.de/ozgcloud-app/vorgang-manager/pulls/443


Reviewed-by: default avatarOZGCloud <ozgcloud@mgm-tp.com>
parents 469cb79c 09e5a562
No related branches found
No related tags found
No related merge requests found
...@@ -48,6 +48,13 @@ spec: ...@@ -48,6 +48,13 @@ spec:
- podSelector: - podSelector:
matchLabels: matchLabels:
ozg-component: xta-adapter ozg-component: xta-adapter
- from:
- namespaceSelector:
matchLabels:
name: {{ (.Values.networkPolicy).monitoringNamespace | default "openshift-user-workload-monitoring" }}
ports:
- protocol: TCP
port: 8081
{{- if ((.Values.ozgcloud).antragraum).enabled }} {{- if ((.Values.ozgcloud).antragraum).enabled }}
- from: - from:
- namespaceSelector: - namespaceSelector:
......
...@@ -107,6 +107,40 @@ tests: ...@@ -107,6 +107,40 @@ tests:
matchLabels: matchLabels:
ozg-component: xta-adapter ozg-component: xta-adapter
- it: should add ingress rule for monitoring scraper
set:
networkPolicy:
dnsServerNamespace: test-dns-namespace
asserts:
- contains:
path: spec.ingress
content:
ports:
- port: 8081
protocol: TCP
from:
- namespaceSelector:
matchLabels:
name: openshift-user-workload-monitoring
- it: should set monitoring namespace for monitoring scraper ingress rule
set:
networkPolicy:
dnsServerNamespace: test-dns-namespace
monitoringNamespace: test-monitoring
asserts:
- contains:
path: spec.ingress
content:
ports:
- port: 8081
protocol: TCP
from:
- namespaceSelector:
matchLabels:
name: test-monitoring
- it: should add ingress rule for antragraum if antragraum is enabled - it: should add ingress rule for antragraum if antragraum is enabled
set: set:
networkPolicy: networkPolicy:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment