Skip to content
Snippets Groups Projects
Commit 5d934c38 authored by OZG-Cloud Team's avatar OZG-Cloud Team
Browse files

ozg-6647 add monitoring network policy

parent f97c7106
No related branches found
No related tags found
No related merge requests found
...@@ -38,6 +38,13 @@ spec: ...@@ -38,6 +38,13 @@ spec:
ingress: ingress:
- ports: - ports:
- port: 8080 - port: 8080
- from:
- namespaceSelector:
matchLabels:
name: {{ (.Values.networkPolicy).monitoringNamespace | default "openshift-monitoring" }}
ports:
- protocol: TCP
port: 8081
egress: egress:
- to: - to:
- podSelector: - podSelector:
......
...@@ -70,6 +70,13 @@ tests: ...@@ -70,6 +70,13 @@ tests:
ingress: ingress:
- ports: - ports:
- port: 8080 - port: 8080
- from:
- namespaceSelector:
matchLabels:
name: openshift-monitoring
ports:
- protocol: TCP
port: 8081
egress: egress:
- to: - to:
- podSelector: - podSelector:
...@@ -92,6 +99,23 @@ tests: ...@@ -92,6 +99,23 @@ tests:
- port: 5353 - port: 5353
protocol: TCP protocol: TCP
- it: should set monitoring namespace
set:
networkPolicy:
dnsServerNamespace: test-dns-namespace
monitoringNamespace: test-monitoring
asserts:
- contains:
path: spec.ingress
content:
from:
- namespaceSelector:
matchLabels:
name: test-monitoring
ports:
- protocol: TCP
port: 8081
- it: test network policy disabled - it: test network policy disabled
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