about summary refs log tree commit diff
path: root/tools/prometheus/templates
diff options
context:
space:
mode:
authormakefunstuff <[email protected]>2024-06-29 22:51:44 +0200
committermakefunstuff <[email protected]>2024-06-29 22:51:44 +0200
commitb442ea1028572a5ac071c637c5f1c219d58294e8 (patch)
treeb3b1717dcc45765c02a280ffe1c503b56d4749c5 /tools/prometheus/templates
parente86663c99e616a42fd1b9ed9447c697abea8ebaf (diff)
downloadk3s-lab-b442ea1028572a5ac071c637c5f1c219d58294e8.tar.gz
restore prometheus
Diffstat (limited to 'tools/prometheus/templates')
-rw-r--r--tools/prometheus/templates/network-policy.yaml21
1 files changed, 21 insertions, 0 deletions
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