File tree Expand file tree Collapse file tree 7 files changed +12
-28
lines changed Expand file tree Collapse file tree 7 files changed +12
-28
lines changed Original file line number Diff line number Diff line change 11apiVersion : v2
22name : team
33description : A Helm Chart to bootstrap a Namespace in a Multi-Tenancy setup
4- version : 1 .0.0
4+ version : 2 .0.0
55type : application
66
Original file line number Diff line number Diff line change @@ -56,25 +56,3 @@ helm.sh/chart: {{ include "team.chart" . }}
5656{ {- end } }
5757{ {- end } }
5858
59-
60- { {/*
61- Create the name of the NetworkPolicy to deny all outgoing traffic
62- */} }
63- { {- define " team.networkPolicy.egress.deny.all.name" } }
64- { {- printf " %s-%s" ((include " team.fullname" .) | trunc 47 | trimSuffix " -" ) " egress-deny-all" } }
65- { {- end } }
66-
67- { {/*
68- Create the name of the NetworkPolicy to allow outgoing traffic to the Kubernetes DNS
69- */} }
70- { {- define " team.networkPolicy.egress.allow.dns.name" } }
71- { {- printf " %s-%s" ((include " team.fullname" .) | trunc 47 | trimSuffix " -" ) " egress-allow-dns" } }
72- { {- end } }
73-
74- { {/*
75- Create the name of the NetworkPolicy to deny all incoming traffic
76- */} }
77- { {- define " team.networkPolicy.ingress.deny.all.name" } }
78- { {- printf " %s-%s" ((include " team.fullname" .) | trunc 46 | trimSuffix " -" ) " ingress-deny-all" } }
79- { {- end } }
80-
Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ metadata:
1818 {{- toYaml . | nindent 4 }}
1919 {{- end }}
2020 {{- end }}
21- name : {{ include "team.networkPolicy. egress.allow.dns.name" $ | quote }}
21+ name : {{ $.Values.networkPolicies. egress.allow.dns.name }}
2222 namespace : {{ $name }}
2323spec :
2424 {{- if $.Values.networkPolicies.egress.allow.dns.podSelector }}
Original file line number Diff line number Diff line change 1- {{- if and (.Values.networkPolicies.enabled) (.Values.networkPolicies.egress.deny.all) }}
1+ {{- if and (.Values.networkPolicies.enabled) (.Values.networkPolicies.egress.deny.all.enabled ) }}
22{{- range $name, $tenant := .Values.namespaces }}
33---
44apiVersion : networking.k8s.io/v1
@@ -18,7 +18,7 @@ metadata:
1818 {{- toYaml . | nindent 4 }}
1919 {{- end }}
2020 {{- end }}
21- name : {{ include "team.networkPolicy. egress.deny.all.name" $ | quote }}
21+ name : {{ $.Values.networkPolicies. egress.deny.all.name }}
2222 namespace : {{ $name }}
2323spec :
2424 {{- if $.Values.networkPolicies.egress.deny.all.podSelector }}
Original file line number Diff line number Diff line change 1- {{- if and (.Values.networkPolicies.enabled) (.Values.networkPolicies.ingress.deny.all) }}
1+ {{- if and (.Values.networkPolicies.enabled) (.Values.networkPolicies.ingress.deny.all.enabled ) }}
22{{- range $name, $tenant := .Values.namespaces }}
33---
44apiVersion : networking.k8s.io/v1
@@ -18,7 +18,7 @@ metadata:
1818 {{- toYaml . | nindent 4 }}
1919 {{- end }}
2020 {{- end }}
21- name : {{ include "team.networkPolicy. ingress.deny.all.name" $ | quote }}
21+ name : {{ $.Values.networkPolicies. ingress.deny.all.name }}
2222 namespace : {{ $name }}
2323spec :
2424 {{- if $.Values.networkPolicies.ingress.deny.all.podSelector }}
Original file line number Diff line number Diff line change @@ -12,12 +12,14 @@ networkPolicies:
1212 egress :
1313 deny :
1414 all :
15+ name : egress-deny-all
1516 # -- create a NetworkPolicy that denies all outgoing traffic
1617 enabled : true
1718 # -- define a PodSelector that should be used. Uses all Pods by default
1819 podSelector : {}
1920 allow :
2021 dns :
22+ name : egress-allow-dns
2123 # -- create a NetworkPolicy that allows outgoing traffic to the Kubernetes DNS
2224 enabled : true
2325 # -- The namespace where the Kubneretes DNS is running
@@ -30,6 +32,7 @@ networkPolicies:
3032 ingress :
3133 deny :
3234 all :
35+ name : ingress-deny-all
3336 # -- create a NetworkPolicy that denies all incoming traffic
3437 enabled : true
3538 # -- define a PodSelector that should be used. Uses all Pods by default
Original file line number Diff line number Diff line change @@ -8,12 +8,14 @@ networkPolicies:
88 egress :
99 deny :
1010 all :
11+ name : egress-deny-all
1112 # -- create a NetworkPolicy that denies all outgoing traffic
1213 enabled : true
1314 # -- define a PodSelector that should be used. Uses all Pods by default
1415 podSelector : {}
1516 allow :
1617 dns :
18+ name : egress-allow-dns
1719 # -- create a NetworkPolicy that allows outgoing traffic to the Kubernetes DNS
1820 enabled : true
1921 # -- The namespace where the Kubneretes DNS is running
@@ -26,6 +28,7 @@ networkPolicies:
2628 ingress :
2729 deny :
2830 all :
31+ name : ingress-deny-all
2932 # -- create a NetworkPolicy that denies all incoming traffic
3033 enabled : true
3134 # -- define a PodSelector that should be used. Uses all Pods by default
You can’t perform that action at this time.
0 commit comments