From e95b623f74dd5a3ec06686bc52a4027f6ea06be2 Mon Sep 17 00:00:00 2001 From: makefunstuff Date: Fri, 28 Jun 2024 23:15:30 +0300 Subject: accept prometheus traffic from grafana --- tools/prometheus/templates/network-policy.yaml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 tools/prometheus/templates/network-policy.yaml diff --git a/tools/prometheus/templates/network-policy.yaml b/tools/prometheus/templates/network-policy.yaml new file mode 100644 index 0000000..981d050 --- /dev/null +++ b/tools/prometheus/templates/network-policy.yaml @@ -0,0 +1,21 @@ +apiVersion: networking.k8s.io/v1 +kind: NetworkPolicy +metadata: + name: allow-grafana-to-prometheus + namespace: monitoring +spec: + podSelector: + matchLabels: + app.kubernetes.io/name: prometheus + policyTypes: + - Ingress + ingress: + - from: + - podSelector: + matchLabels: + app.kubernetes.io/name: grafana + ports: + - protocol: TCP + port: 9090 + - protocol: TCP + port: 80 -- cgit 1.4.1-2-gfad0