mirror of
https://github.com/nextcloud/all-in-one.git
synced 2025-12-26 17:36:53 +00:00
Merge pull request #5024 from nextcloud/enh/noid/add-network-policy
helm: add network policy
This commit is contained in:
commit
00c41624ea
3 changed files with 45 additions and 0 deletions
20
nextcloud-aio-helm-chart/templates/nextcloud-aio-networkpolicy.yaml
Executable file
20
nextcloud-aio-helm-chart/templates/nextcloud-aio-networkpolicy.yaml
Executable file
|
|
@ -0,0 +1,20 @@
|
|||
{{- 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:
|
||||
policyTypes:
|
||||
- Ingress
|
||||
- Egress
|
||||
ingress:
|
||||
- from:
|
||||
- podSelector: {}
|
||||
egress:
|
||||
- to:
|
||||
- podSelector: {}
|
||||
{{- end }}
|
||||
Loading…
Add table
Add a link
Reference in a new issue