File tree 7 files changed +12
-28
lines changed
7 files changed +12
-28
lines changed Original file line number Diff line number Diff line change 1
1
apiVersion : v2
2
2
name : team
3
3
description : A Helm Chart to bootstrap a Namespace in a Multi-Tenancy setup
4
- version : 1 .0.0
4
+ version : 2 .0.0
5
5
type : application
6
6
Original file line number Diff line number Diff line change @@ -56,25 +56,3 @@ helm.sh/chart: {{ include "team.chart" . }}
56
56
{ {- end } }
57
57
{ {- end } }
58
58
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:
18
18
{{- toYaml . | nindent 4 }}
19
19
{{- end }}
20
20
{{- end }}
21
- name : {{ include "team.networkPolicy. egress.allow.dns.name" $ | quote }}
21
+ name : {{ $.Values.networkPolicies. egress.allow.dns.name }}
22
22
namespace : {{ $name }}
23
23
spec :
24
24
{{- 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 ) }}
2
2
{{- range $name, $tenant := .Values.namespaces }}
3
3
---
4
4
apiVersion : networking.k8s.io/v1
@@ -18,7 +18,7 @@ metadata:
18
18
{{- toYaml . | nindent 4 }}
19
19
{{- end }}
20
20
{{- end }}
21
- name : {{ include "team.networkPolicy. egress.deny.all.name" $ | quote }}
21
+ name : {{ $.Values.networkPolicies. egress.deny.all.name }}
22
22
namespace : {{ $name }}
23
23
spec :
24
24
{{- 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 ) }}
2
2
{{- range $name, $tenant := .Values.namespaces }}
3
3
---
4
4
apiVersion : networking.k8s.io/v1
@@ -18,7 +18,7 @@ metadata:
18
18
{{- toYaml . | nindent 4 }}
19
19
{{- end }}
20
20
{{- end }}
21
- name : {{ include "team.networkPolicy. ingress.deny.all.name" $ | quote }}
21
+ name : {{ $.Values.networkPolicies. ingress.deny.all.name }}
22
22
namespace : {{ $name }}
23
23
spec :
24
24
{{- if $.Values.networkPolicies.ingress.deny.all.podSelector }}
Original file line number Diff line number Diff line change @@ -12,12 +12,14 @@ networkPolicies:
12
12
egress :
13
13
deny :
14
14
all :
15
+ name : egress-deny-all
15
16
# -- create a NetworkPolicy that denies all outgoing traffic
16
17
enabled : true
17
18
# -- define a PodSelector that should be used. Uses all Pods by default
18
19
podSelector : {}
19
20
allow :
20
21
dns :
22
+ name : egress-allow-dns
21
23
# -- create a NetworkPolicy that allows outgoing traffic to the Kubernetes DNS
22
24
enabled : true
23
25
# -- The namespace where the Kubneretes DNS is running
@@ -30,6 +32,7 @@ networkPolicies:
30
32
ingress :
31
33
deny :
32
34
all :
35
+ name : ingress-deny-all
33
36
# -- create a NetworkPolicy that denies all incoming traffic
34
37
enabled : true
35
38
# -- 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:
8
8
egress :
9
9
deny :
10
10
all :
11
+ name : egress-deny-all
11
12
# -- create a NetworkPolicy that denies all outgoing traffic
12
13
enabled : true
13
14
# -- define a PodSelector that should be used. Uses all Pods by default
14
15
podSelector : {}
15
16
allow :
16
17
dns :
18
+ name : egress-allow-dns
17
19
# -- create a NetworkPolicy that allows outgoing traffic to the Kubernetes DNS
18
20
enabled : true
19
21
# -- The namespace where the Kubneretes DNS is running
@@ -26,6 +28,7 @@ networkPolicies:
26
28
ingress :
27
29
deny :
28
30
all :
31
+ name : ingress-deny-all
29
32
# -- create a NetworkPolicy that denies all incoming traffic
30
33
enabled : true
31
34
# -- define a PodSelector that should be used. Uses all Pods by default
You can’t perform that action at this time.
0 commit comments