apiVersion: certmanager.k8s.io/v1alpha1
kind: ClusterIssuer
metadata:
  name: {{ .Values.ingressShim.defaultIssuerName }}
spec:
  acme:
    {{- if eq .Values.ingressShim.defaultIssuerName "letsencrypt-prod" }}
    server: "https://acme-v02.api.letsencrypt.org/directory"
    {{- else if eq .Values.ingressShim.defaultIssuerName "letsencrypt-staging" }}
    server: "https://acme-staging-v02.api.letsencrypt.org/directory"
    {{- else }}
    server: {{ .Values.letsencrypt.server }}
    {{- end }}
    email: {{ .Values.letsencrypt.email }}
    privateKeySecretRef:
      name: {{ .Values.ingressShim.defaultIssuerName }}-account-key
    http01: {}
