File tree 4 files changed +72
-0
lines changed
deploy/charts/cert-manager
4 files changed +72
-0
lines changed Original file line number Diff line number Diff line change @@ -146,6 +146,9 @@ The following table lists the configurable parameters of the cert-manager chart
146
146
| ` webhook.serviceAccount.automountServiceAccountToken ` | Automount API credentials for the webhook Service Account | |
147
147
| ` webhook.resources ` | CPU/memory resource requests/limits for the webhook pods | ` {} ` |
148
148
| ` webhook.nodeSelector ` | Node labels for webhook pod assignment | ` {} ` |
149
+ | ` webhook.networkPolicy.enabled ` | Enable default network policies for webhooks egress and ingress traffic | ` false ` |
150
+ | ` webhook.networkPolicy.ingress ` | Sets ingress policy block. See NetworkPolicy documentation. See ` values.yaml ` for example. | ` {} ` |
151
+ | ` webhook.networkPolicy.egress ` | Sets ingress policy block. See NetworkPolicy documentation. See ` values.yaml ` for example. | ` {} ` |
149
152
| ` webhook.affinity ` | Node affinity for webhook pod assignment | ` {} ` |
150
153
| ` webhook.tolerations ` | Node tolerations for webhook pod assignment | ` [] ` |
151
154
| ` webhook.topologySpreadConstraints ` | Topology spread constraints for webhook pod assignment | ` [] ` |
Original file line number Diff line number Diff line change
1
+ {{- if .Values.webhook.networkPolicy.enabled }}
2
+ apiVersion : networking.k8s.io/v1
3
+ kind : NetworkPolicy
4
+ metadata :
5
+ name : {{ template "webhook.fullname" . }}-allow-egress
6
+ namespace : {{ include "cert-manager.namespace" . }}
7
+ spec :
8
+ egress :
9
+ {{- with .Values.webhook.networkPolicy.egress }}
10
+ {{- toYaml . | nindent 2 }}
11
+ {{- end }}
12
+ podSelector :
13
+ matchLabels :
14
+ app : {{ include "webhook.name" . }}
15
+ app.kubernetes.io/name : {{ include "webhook.name" . }}
16
+ app.kubernetes.io/instance : {{ .Release.Name }}
17
+ app.kubernetes.io/component : " webhook"
18
+ {{- with .Values.webhook.podLabels }}
19
+ {{- toYaml . | nindent 6 }}
20
+ {{- end }}
21
+ policyTypes :
22
+ - Egress
23
+ {{- end }}
Original file line number Diff line number Diff line change
1
+ {{- if .Values.webhook.networkPolicy.enabled }}
2
+
3
+ apiVersion : networking.k8s.io/v1
4
+ kind : NetworkPolicy
5
+ metadata :
6
+ name : {{ template "webhook.fullname" . }}-allow-ingress
7
+ namespace : {{ include "cert-manager.namespace" . }}
8
+ spec :
9
+ ingress :
10
+ {{- with .Values.webhook.networkPolicy.ingress }}
11
+ {{- toYaml . | nindent 2 }}
12
+ {{- end }}
13
+ podSelector :
14
+ matchLabels :
15
+ app : {{ include "webhook.name" . }}
16
+ app.kubernetes.io/name : {{ include "webhook.name" . }}
17
+ app.kubernetes.io/instance : {{ .Release.Name }}
18
+ app.kubernetes.io/component : " webhook"
19
+ {{- with .Values.webhook.podLabels }}
20
+ {{- toYaml . | nindent 6 }}
21
+ {{- end }}
22
+ policyTypes :
23
+ - Ingress
24
+
25
+ {{- end }}
Original file line number Diff line number Diff line change @@ -389,6 +389,27 @@ webhook:
389
389
url : {}
390
390
# host:
391
391
392
+ # Enables default network policies for webhooks.
393
+ networkPolicy :
394
+ enabled : false
395
+ ingress :
396
+ - from :
397
+ - ipBlock :
398
+ cidr : 0.0.0.0/0
399
+ egress :
400
+ - ports :
401
+ - port : 80
402
+ protocol : TCP
403
+ - port : 443
404
+ protocol : TCP
405
+ - port : 53
406
+ protocol : TCP
407
+ - port : 53
408
+ protocol : UDP
409
+ to :
410
+ - ipBlock :
411
+ cidr : 0.0.0.0/0
412
+
392
413
cainjector :
393
414
enabled : true
394
415
replicaCount : 1
You can’t perform that action at this time.
0 commit comments