configure-cert-manager.yaml 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. {{- if .Values.cert.certManager.autoConfigure }}
  2. ---
  3. apiVersion: cert-manager.io/v1
  4. kind: Issuer
  5. metadata:
  6. name: "{{ .Release.Name }}-self-signed-issuer"
  7. namespace: "{{ .Release.Namespace }}"
  8. spec:
  9. selfSigned: {}
  10. ---
  11. apiVersion: cert-manager.io/v1
  12. kind: Certificate
  13. metadata:
  14. name: "{{ .Release.Name }}-certs"
  15. namespace: "{{ .Release.Namespace }}"
  16. spec:
  17. secretName: "{{ include "cert-name" . }}"
  18. duration: "{{ .Values.cert.certManager.duration }}"
  19. renewBefore: "{{ .Values.cert.certManager.renewBefore }}"
  20. subject:
  21. organizations:
  22. - OnGres
  23. isCA: true
  24. privateKey:
  25. algorithm: RSA
  26. encoding: "{{ .Values.cert.certManager.encoding }}"
  27. size: {{ .Values.cert.certManager.size }}
  28. usages:
  29. - server auth
  30. - client auth
  31. dnsNames:
  32. - {{ .Release.Name }}
  33. - {{ .Release.Name }}.{{ .Release.Namespace }}
  34. - {{ .Release.Name }}.{{ .Release.Namespace }}.svc
  35. - {{ .Release.Name }}.{{ .Release.Namespace }}.svc.cluster.local
  36. issuerRef:
  37. name: "{{ .Release.Name }}-self-signed-issuer"
  38. kind: Issuer
  39. group: cert-manager.io
  40. {{ end }}