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

ozg-6647 add monitoring network policy

parent df76ce6e
Branches
Tags
No related merge requests found
......@@ -48,6 +48,13 @@ spec:
- podSelector:
matchLabels:
ozg-component: xta-adapter
- from:
- namespaceSelector:
matchLabels:
name: {{ (.Values.networkPolicy).monitoringNamespace | default "openshift-monitoring" }}
ports:
- protocol: TCP
port: 8081
{{- if ((.Values.ozgcloud).antragraum).enabled }}
- from:
- namespaceSelector:
......
......@@ -107,6 +107,40 @@ tests:
matchLabels:
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-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
set:
networkPolicy:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment