all-in-one/nextcloud-aio-helm-chart/templates/nextcloud-aio-networkpolicy.yaml
Simon L. 8a9c5ae973 helm: add network policy
Signed-off-by: Simon L. <szaimen@e.mail.de>
2024-07-24 16:06:20 +02:00

14 lines
408 B
YAML
Executable file

{{- if eq .Values.NETWORK_POLICY_ENABLED "yes" }}
# https://github.com/ahmetb/kubernetes-network-policy-recipes/blob/master/04-deny-traffic-from-other-namespaces.md
kind: NetworkPolicy
apiVersion: networking.k8s.io/v1
metadata:
namespace: "{{ .Values.NAMESPACE }}"
name: nextcloud-aio-deny-from-other-namespaces
spec:
podSelector:
matchLabels:
ingress:
- from:
- podSelector: {}
{{- end }}