{%- if custom_domains|length > 0 %}
---
apiVersion: cert-manager.io/v1alpha2
kind: Issuer
metadata:
  name: {{ id }}
  namespace: {{ namespace }}
  labels:
    routerLongId: {{ long_id }}
    envLongId: {{ environment_long_id }}
    projectLongId: {{ project_long_id }}
spec:
  acme:
    server: {{ spec_acme_server }}
    email: {{ spec_acme_email }}
    privateKeySecretRef:
      name: acme-{{ id }}-key
    solvers:
      - http01:
          ingress:
            class: nginx-qovery
{%- endif %}
