Uploaded image for project: 'OpenShift GitOps'
  1. OpenShift GitOps
  2. GITOPS-2417

Argo CD .status.host is updated with wrong value when using Ingress on OpenShift clusters

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Critical
    • 1.7.0
    • None
    • Operator
    • None
    • GITOPS Sprint 227, GITOPS Sprint 228

    Description

      Description of problem:

      Argo CD .status.host is updated with wrong value when using Ingress on OpenShift clusters

      Original Jira https://issues.redhat.com/browse/GITOPS-1920

      Prerequisites (if any, like setup, operators/versions):

      Openshift 4.11

      Gitops Operator 1.7.0-17 (IIB 372952)

      Steps to Reproduce

      kuttl e2e test : https://gitlab.cee.redhat.com/gitops/operator-e2e/-/merge_requests/129

      1. Create test-namespace 'test-ns'
      2. Apps domain name can be obtained with:
        apps_domain_name=$(
              oc get dnsrecords.ingress.operator.openshift.io/default-wildcard \
              -n openshift-ingress-operator \
              -o jsonpath='{.spec.dnsName}' | cut -d '.' -f 2-5
            )
      1. Create Argo CD instance with the manifest 
        apiVersion: argoproj.io/v1alpha1    
        kind: ArgoCD    
        metadata:      
          name: example-argocd      
          namespace: test-ns
          labels:        
            example: ingress    
        spec:      
          server:        
            host: example-argocd.<apps_domain_name>
            grpc:          
              ingress:            
                enabled: true        
            ingress:          
              enabled: true          
              tls:          
              - hosts:              
                - example-argocd        
            insecure: true

      Actual results:

      The ingress is created and it's getting Argo CD's .spec.server.host as HOSTS (.spec.rules[0].host):

      NAME                    CLASS    HOSTS                                                    ADDRESS                                             
      example-argocd-server   <none>   example-argocd.apps.rjeczkowaws-411z.ocp-gitops-qe.com   router-default.apps.rjeczkowaws-411z.ocp-gitops-qe.com 
      $ oc get ingress/example-argocd-server -o jsonpath="{.spec.rules[0].host}" -n test-ns
      example-argocd.apps.rjeczkowaws-411z.ocp-gitops-qe.com
      

       

      Argo CD on .status.host field is updated with router-default.apps.rjeczkowaws-411z.ocp-gitops-qe.com which is the same as Ingress ADDRESS (.status.loadBalancer.ingress[0].hostname).

      $ oc get argocd -o jsonpath="{.items[*]['status.host']}" -n test-ns
      router-default.apps.rjeczkowaws-411z.ocp-gitops-qe.com
      $ oc get ingress/example-argocd-server -o jsonpath="{.status.loadBalancer.ingress[0].hostname}" -n test-ns
      router-default.apps.rjeczkowaws-411z.ocp-gitops-qe.com

       

      Expected results:

      Argo CD should copy the value of Ingress .spec.rules[0].host (instead of .status.loadBalancer.ingress[0].hostname) to .status.host because that's the URL of Argo CD.

       

       

      Reproducibility (Always/Intermittent/Only Once):

      Always

      Build Details:

      Gitops Operator 1.7.0-17 (IIB 372952)

      Additional info (Such as Logs, Screenshots, etc):

      Attachments

        Issue Links

          Activity

            People

              aveerama@redhat.com Abhishek Veeramalla
              rjeczkow Roman Jeczkowiak (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: