webhook-certificate.yaml 1.2 KB

123456789101112131415161718192021222324252627282930
  1. {{- if and .Values.webhook.create .Values.webhook.certManager.enabled .Values.webhook.certManager.cert.create }}
  2. ---
  3. apiVersion: cert-manager.io/v1
  4. kind: Certificate
  5. metadata:
  6. name: {{ include "external-secrets.fullname" . }}-webhook
  7. namespace: {{ .Release.Namespace | quote }}
  8. labels:
  9. {{- include "external-secrets-webhook.labels" . | nindent 4 }}
  10. external-secrets.io/component: webhook
  11. {{- with .Values.webhook.certManager.cert.annotations }}
  12. annotations:
  13. {{- toYaml . | nindent 4 }}
  14. {{- end }}
  15. spec:
  16. commonName: {{ include "external-secrets.fullname" . }}-webhook
  17. dnsNames:
  18. - {{ include "external-secrets.fullname" . }}-webhook
  19. - {{ include "external-secrets.fullname" . }}-webhook.{{ .Release.Namespace }}
  20. - {{ include "external-secrets.fullname" . }}-webhook.{{ .Release.Namespace }}.svc
  21. issuerRef:
  22. {{- toYaml .Values.webhook.certManager.cert.issuerRef | nindent 4 }}
  23. {{- with .Values.webhook.certManager.cert.duration }}
  24. duration: {{ . | quote }}
  25. {{- end }}
  26. {{- with .Values.webhook.certManager.cert.renewBefore }}
  27. renewBefore: {{ . | quote }}
  28. {{- end }}
  29. secretName: {{ include "external-secrets.fullname" . }}-webhook
  30. {{- end }}