update
diff --git a/charts/cert-manager/templates/networkpolicy-webhooks.yaml b/charts/cert-manager/templates/networkpolicy-webhooks.yaml
index 349877a..7377117 100644
--- a/charts/cert-manager/templates/networkpolicy-webhooks.yaml
+++ b/charts/cert-manager/templates/networkpolicy-webhooks.yaml
@@ -1,5 +1,5 @@
{{- if .Values.webhook.networkPolicy.enabled }}
-
+---
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
@@ -12,14 +12,27 @@
{{- end }}
podSelector:
matchLabels:
- app: {{ include "webhook.name" . }}
- app.kubernetes.io/name: {{ include "webhook.name" . }}
- app.kubernetes.io/instance: {{ .Release.Name }}
- app.kubernetes.io/component: "webhook"
- {{- with .Values.webhook.podLabels }}
- {{- toYaml . | nindent 6 }}
- {{- end }}
+ app.kubernetes.io/name: {{ include "webhook.name" . }}
+ app.kubernetes.io/instance: {{ .Release.Name }}
+ app.kubernetes.io/component: "webhook"
policyTypes:
- Ingress
-
+---
+apiVersion: networking.k8s.io/v1
+kind: NetworkPolicy
+metadata:
+ name: {{ template "webhook.fullname" . }}-allow-egress
+ namespace: {{ include "cert-manager.namespace" . }}
+spec:
+ egress:
+ {{- with .Values.webhook.networkPolicy.egress }}
+ {{- toYaml . | nindent 2 }}
+ {{- end }}
+ podSelector:
+ matchLabels:
+ app.kubernetes.io/name: {{ include "webhook.name" . }}
+ app.kubernetes.io/instance: {{ .Release.Name }}
+ app.kubernetes.io/component: "webhook"
+ policyTypes:
+ - Egress
{{- end }}