From 47b16f326de0cd31fb3d31b25b04f88ad6708214 Mon Sep 17 00:00:00 2001
From: Sheogorath <sheogorath@shivering-isles.com>
Date: Wed, 2 Feb 2022 21:27:08 +0100
Subject: [PATCH] fix(monitoring): Add basic network policy

---
 infrastructure/monitoring/kustomization.yaml          |  1 +
 shared/networkpolicies/allow-from-same-namespace.yaml | 10 ++++++++++
 2 files changed, 11 insertions(+)
 create mode 100644 shared/networkpolicies/allow-from-same-namespace.yaml

diff --git a/infrastructure/monitoring/kustomization.yaml b/infrastructure/monitoring/kustomization.yaml
index 8fcc611e7..ab59d1481 100644
--- a/infrastructure/monitoring/kustomization.yaml
+++ b/infrastructure/monitoring/kustomization.yaml
@@ -5,3 +5,4 @@ resources:
   - namespace.yaml
   - repository.yaml
   - release.yaml
+  - ../../shared/networkpolicies/allow-from-same-namespace.yaml
diff --git a/shared/networkpolicies/allow-from-same-namespace.yaml b/shared/networkpolicies/allow-from-same-namespace.yaml
new file mode 100644
index 000000000..237d3a8d1
--- /dev/null
+++ b/shared/networkpolicies/allow-from-same-namespace.yaml
@@ -0,0 +1,10 @@
+---
+apiVersion: networking.k8s.io/v1
+kind: NetworkPolicy
+name: allow-from-same-namespace
+data:
+  spec:
+    podSelector: {}
+    ingress:
+    - from:
+      - podSelector: {}
-- 
GitLab