Skip to content

Commit 6e90849

Browse files
authored
🐛 Add RHSSO servicemonitor networkpolicy (#417)
The servicemonitor endpoints are defined but inaccessible if monitoring is enabled on the namespace because we do not have a networkpolicy that allows access. RHBK has no servicemonitors, so in the case of RHBK there is nothing to do. Signed-off-by: Jason Montleon <[email protected]>
1 parent 6ff3756 commit 6e90849

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

roles/tackle/templates/networkpolicy.yml.j2

+20
Original file line numberDiff line numberDiff line change
@@ -60,3 +60,23 @@ spec:
6060
network.openshift.io/policy-group: monitoring
6161
- ports:
6262
- port: {{ hub_metrics_port }}
63+
{% if app_profile == 'mta' %}
64+
---
65+
apiVersion: networking.k8s.io/v1
66+
kind: NetworkPolicy
67+
metadata:
68+
name: {{ app_name }}-rhsso-metrics
69+
namespace: {{ app_namespace }}
70+
spec:
71+
ingress:
72+
- from:
73+
- namespaceSelector:
74+
matchLabels:
75+
network.openshift.io/policy-group: monitoring
76+
- ports:
77+
- port: 8383
78+
- port: 8686
79+
podSelector:
80+
matchLabels:
81+
name: rhsso-operator
82+
{% endif %}

0 commit comments

Comments
 (0)