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

ozg-6647 add monitoring network policy

parent 39e1e1df
Branches
Tags
Loading
...@@ -49,6 +49,13 @@ spec: ...@@ -49,6 +49,13 @@ spec:
- podSelector: - podSelector:
matchLabels: matchLabels:
component: alfa component: alfa
- from:
- namespaceSelector:
matchLabels:
name: {{ (.Values.networkPolicy).monitoringNamespace | default "openshift-user-workload-monitoring" }}
ports:
- protocol: TCP
port: 9002
{{- with (.Values.networkPolicy).additionalIngressConfigLocal }} {{- with (.Values.networkPolicy).additionalIngressConfigLocal }}
{{ toYaml . | indent 2 }} {{ toYaml . | indent 2 }}
{{- end }} {{- end }}
......
...@@ -86,6 +86,13 @@ tests: ...@@ -86,6 +86,13 @@ tests:
- podSelector: - podSelector:
matchLabels: matchLabels:
component: alfa component: alfa
- ports:
- port: 9002
protocol: TCP
from:
- namespaceSelector:
matchLabels:
name: openshift-user-workload-monitoring
egress: egress:
- to: - to:
- podSelector: - podSelector:
...@@ -181,6 +188,24 @@ tests: ...@@ -181,6 +188,24 @@ tests:
matchLabels: matchLabels:
component: local-client component: local-client
- it: should set monitoring namespace for monitoring scraper ingress rule
set:
networkPolicy:
ssoPublicIp: 51.89.117.53/32
dnsServerNamespace: test-namespace-dns
monitoringNamespace: test-monitoring
asserts:
- contains:
path: spec.ingress
content:
ports:
- port: 9002
protocol: TCP
from:
- namespaceSelector:
matchLabels:
name: test-monitoring
- it: should add additionalEgressConfigLocal - it: should add additionalEgressConfigLocal
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