summaryrefslogtreecommitdiff
path: root/k8s/network-policy.yaml
diff options
context:
space:
mode:
authorSanto Cariotti <santo@dcariotti.me>2024-09-06 16:09:25 +0200
committerSanto Cariotti <santo@dcariotti.me>2024-09-06 16:09:25 +0200
commitff68c8cd24baef66ebb038d237b8f501c84edde5 (patch)
treea719191dce466a03244a705337f58c8f83f6f926 /k8s/network-policy.yaml
parentc4ef50c1f566b86c8892fa344ade8d5ca66fb93b (diff)
Add script and configuration for Kubernetes
Diffstat (limited to 'k8s/network-policy.yaml')
-rw-r--r--k8s/network-policy.yaml18
1 files changed, 18 insertions, 0 deletions
diff --git a/k8s/network-policy.yaml b/k8s/network-policy.yaml
new file mode 100644
index 0000000..2af8a27
--- /dev/null
+++ b/k8s/network-policy.yaml
@@ -0,0 +1,18 @@
+apiVersion: networking.k8s.io/v1
+kind: NetworkPolicy
+metadata:
+ name: allow-cas-postgres
+spec:
+ podSelector:
+ matchLabels:
+ app: cas
+ policyTypes:
+ - Ingress
+ ingress:
+ - from:
+ - podSelector:
+ matchLabels:
+ app: postgres
+ ports:
+ - protocol: TCP
+ port: 5432