File tree Expand file tree Collapse file tree 2 files changed +56
-1
lines changed Expand file tree Collapse file tree 2 files changed +56
-1
lines changed Original file line number Diff line number Diff line change
1
+ {{- if .Values.networkPolicy.enabled }}
2
+ {{- if and .Values.networkPolicy.ingressFromTenants.enabled (gt (len .Values.tenants) 0) }}
3
+ ---
4
+ apiVersion : networking.k8s.io/v1
5
+ kind : NetworkPolicy
6
+ metadata :
7
+ name : allow-traffic-from-burrito-tenants
8
+ labels :
9
+ {{- with .Values.global.metadata.labels }}
10
+ {{- toYaml . | nindent 4 }}
11
+ {{- end }}
12
+ {{- with .Values.networkPolicy.metadata.labels }}
13
+ {{- toYaml . | nindent 4 }}
14
+ {{- end }}
15
+ annotations :
16
+ {{- with .Values.global.metadata.annotations }}
17
+ {{- toYaml . | nindent 4 }}
18
+ {{- end }}
19
+ {{- with .Values.networkPolicy.metadata.annotations }}
20
+ {{- toYaml . | nindent 4 }}
21
+ {{- end }}
22
+ spec :
23
+ podSelector : {}
24
+ policyTypes :
25
+ - Ingress
26
+ ingress :
27
+ # Allow all traffic from tenant namespaces
28
+ {{- range .Values.tenants }}
29
+ {{- if .namespace.create }}
30
+ - from :
31
+ - namespaceSelector :
32
+ matchLabels :
33
+ kubernetes.io/metadata.name : {{ .namespace.name }}
34
+ {{- end }}
35
+ {{- end }}
36
+ {{- with .Values.networkPolicy.ingressFromTenants.additionalIngressRules }}
37
+ {{- toYaml . | nindent 4 }}
38
+ {{- end }}
39
+ {{- end }}
40
+ {{- end }}
Original file line number Diff line number Diff line change @@ -103,7 +103,7 @@ config:
103
103
repository : ghcr.io/padok-team/burrito
104
104
tag : " " # By default use Chart's appVersion
105
105
pullPolicy : Always
106
-
106
+
107
107
# -- Command to run in the Burrito runner container
108
108
command : ["burrito"]
109
109
# -- Arguments to pass to the Burrito runner container
@@ -485,3 +485,18 @@ tenants: []
485
485
# annotations:
486
486
# iam.cloud.provider/role: cloud-provider-role
487
487
# labels: {}
488
+
489
+ # Network Policy configuration
490
+ networkPolicy :
491
+ # -- Enable/Disable Network Policy creation
492
+ enabled : false
493
+ # -- Metadata configuration for Network Policies
494
+ metadata :
495
+ labels : {}
496
+ annotations : {}
497
+ # -- Network policy to allow ingress traffic from all the tenant namespaces to the release namespace
498
+ ingressFromTenants :
499
+ # -- Enable/Disable tenant ingress network policy
500
+ enabled : true
501
+ # -- Additional ingress rules for tenant namespaces network policy
502
+ additionalIngressRules : []
You can’t perform that action at this time.
0 commit comments