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

Environment variable ARGOCD_GIT_MODULES_ENABLED is not honored by ApplicationSet controller

    XMLWordPrintable

Details

    • 3
    • False
    • None
    • False
    • Hide
      With this update, Users can add any environment variables such as ArgoCD_GIT_MODULES_ENABLED to the ApplicationSet controller using Argo CD CR.

      For example:
      ```
      apiVersion: argoproj.io/v1alpha1
      kind: ArgoCD
      metadata:
        name: example-argocd
        labels:
          example: basic
      spec:
        applicationSet:
          env:
           - name: ARGOCD_GIT_MODULES_ENABLED
             value: "true"
      ```
      Show
      With this update, Users can add any environment variables such as ArgoCD_GIT_MODULES_ENABLED to the ApplicationSet controller using Argo CD CR. For example: ``` apiVersion: argoproj.io/v1alpha1 kind: ArgoCD metadata:   name: example-argocd   labels:     example: basic spec:   applicationSet:     env:      - name: ARGOCD_GIT_MODULES_ENABLED        value: "true" ```
    • GITOPS Sprint 227, GITOPS Sprint 231

    Description

      Description of problem:

      Environment variable "ARGOCD_GIT_MODULES_ENABLED" can only be set on pod "openshift-gitops-repo-server" and not on the "ApplicationSet controller pod".
      As a result, when using the Git Generator, Git submodules are cloned during the generation of child applications because the variable is missing from the ApplicationSet controller environment.

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

      Openshift 4.10.21
      Red Hat OpenShift GitOps 1.6.2

      Steps to Reproduce

      1. Initialize a Git repository and create one or more sub-modules inside.

      2. Create an ApplicationSet using the Git generator to automatically create application parameters from Yaml/JSON files hosted in the repository

      3. Deploy that ApplicationSet to the cluster

      Actual results:

      The Git generator will clone recursively the repository with all submodules.
      If credentials required to clone these submodules were not configured in ArgoCD, the application generation will fail.

      Expected results:

      When variable ARGOCD_GIT_MODULES_ENABLED is set, the ApplicationSet controller should successfully generate child applications from the cloned repository. No submodule should be cloned in the process.

      Attachments

        Activity

          People

            aveerama@redhat.com Abhishek Veeramalla
            rhn-support-dkarde Dipak Karde
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: