apiVersion: cert-manager.io/v1
kind: ClusterIssuer
metadata:
  name: letsencrypt-prod
spec:
  acme:
    # ACME Server
    # prod : https://acme-v02.api.letsencrypt.org/directory
    # staging : https://acme-staging-v02.api.letsencrypt.org/directory
    server: https://acme-v02.api.letsencrypt.org/directory 
    # ACME Email address
    email: marius@ensrud.net
    privateKeySecretRef:
      name: letsencrypt-prod # staging or production
    solvers:
    - selector:
        dnsZones:
        - 'dogella.com'
      dns01:
        webhook:
          config:
            apiKeySecretRef:
              name: godaddy-api-key
              key: token
            production: true
            ttl: 600
          groupName: acme.bassengvegen.com
          solverName: godaddy
    - selector:
        dnsZones:
        - "ensrud.net"
        - 'jorunnkvam.no'
        - 'krystallen-a401.com'
        - 'ensup.no'
        - 'glossifyme.com'
        - 'bassengvegen.com'
        - 'app.bassengvegen.com'
        - 'dyn.bassengvegen.com'
      dns01:
        cloudflare:
          email: marius@ensrud.net
          apiKeySecretRef:
            name: cloudflare-apikey
            key: api-key
