title: ArgoCD with nginx ingress and cert manager not working
body: <p>I am trying to expose ArgoCD using ingress and cert-manager in GKE cluster(version 1.21.5-gke.1302) but the certificate is not issued.</p>
  <p><strong>Steps to reproduce:</strong></p>
  <ul>
  <li><p>Install cert-manager applying <a href="https://github.com/jetstack/cert-manager/releases/download/v1.6.1/cert-manager.yaml" rel="nofollow noreferrer">this</a> yaml</p>
  </li>
  <li><p>Install nginx ingress-controller with helm running:
  <code>helm install my-release nginx-stable/nginx-ingress</code></p>
  </li>
  <li><p>Create clusterIssuer applying the following:</p>
  </li>
  </ul>
  <pre><code>apiVersion: cert-manager.io/v1
  kind: ClusterIssuer
  metadata:
    name: letsencrypt-cluster-issuer
  spec:
    acme:
      email: example@email.com
      server: https://acme-v02.api.letsencrypt.org/directory
      privateKeySecretRef:
        name: letsencrypt-cluster-issuer-key
      solvers:
      - http01:
         ingress:
           class: nginx
  </code></pre>
  <ul>
  <li>Applied ingress using <a href="https://argo-cd.readthedocs.io/en/stable/operator-manual/ingress/" rel="nofollow noreferrer">this</a> guide and the file:</li>
  </ul>
  <pre><code>apiVersion: networking.k8s.io/v1
  kind: Ingress
  metadata:
    name: argocd-server-ingress
    namespace: argocd
    annotations:
      cert-manager.io/cluster-issuer: letsencrypt-prod
      kubernetes.io/ingress.class: nginx
      kubernetes.io/tls-acme: &quot;true&quot;
      nginx.ingress.kubernetes.io/ssl-passthrough: &quot;true&quot;
      # If you encounter a redirect loop or are getting a 307 response code 
      # then you need to force the nginx ingress to connect to the backend using HTTPS.
      #
      nginx.ingress.kubernetes.io/backend-protocol: &quot;HTTPS&quot;
  spec:
    rules:
    - host: argocd.example.com
      http:
        paths:
        - path: /
          pathType: Prefix
          backend:
            service: 
              name: argocd-server
              port:
                name: https
    tls:
    - hosts:
      - argocd.example.com
      secretName: argocd-secret # do not change, this is provided by Argo CD
  </code></pre>
  <ul>
  <li>Map the ip of ingress-controller to your host name.</li>
  </ul>
  <p><strong>Expected behaviour</strong>: I was expecting a certificate to be created successfully and have access to the app.</p>
  <p><strong>Current status:</strong></p>
  <p>Certificate describe gives me this:</p>
  <pre><code>  Conditions:
      Last Transition Time:        2022-01-18T14:10:14Z
      Message:                     Existing issued Secret is not up to date for spec: [spec.dnsNames]
      Observed Generation:         3
      Reason:                      SecretMismatch
      Status:                      False
      Type:                        Ready
      Last Transition Time:        2022-01-18T14:10:14Z
      Message:                     Issuing certificate as Secret was previously issued by Issuer.cert-manager.io/
      Observed Generation:         1
      Reason:                      IncorrectIssuer
      Status:                      True
      Type:                        Issuing
    Next Private Key Secret Name:  argocd-secret-ccjtv
    Not After:                     2023-01-18T13:39:24Z
    Not Before:                    2022-01-18T13:39:24Z
    Renewal Time:                  2022-09-18T21:39:24Z
  Events:
    Type    Reason     Age                  From          Message
    ----    ------     ----                 ----          -------
    Normal  Requested  16m                  cert-manager  Created new CertificateRequest resource &quot;argocd-secret-qm469&quot;
    Normal  Requested  15m                  cert-manager  Created new CertificateRequest resource &quot;argocd-secret-9ctn4&quot;
    Normal  Reused     7m19s (x2 over 45h)  cert-manager  Reusing private key stored in existing Secret resource &quot;argocd-secret&quot;
  </code></pre>
  <p>Finally I can access the provided url by the challenge but status is pending with reason:
  <code> Waiting for HTTP-01 challenge propagation: failed to perform self check GET request</code></p>
  <p>Does anyone have any idea what might be wrong? It would be highly appreciated.</p>
  <p>Thanks!</p>