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

Extensions that use 'extensions` volumes cannot be reconciled

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Undefined Undefined
    • None
    • 1.15.0
    • Operator
    • False
    • None
    • False

      Description of Problem

      When installing an extension in the server component via an initContainer that requires a volume, if the volume is named `extensions` the operator will fail to reconcile the server Deployment with the error message:

      2025-03-24T21:20:56Z ERROR Reconciler error {"controller": "argocd", "controllerGroup": "argoproj.io", "controllerKind": "ArgoCD", "ArgoCD": {"name":"openshift-gitops","namespace":"openshift-gitops"}, "namespace": "openshift-gitops", "name": "openshift-gitops", "reconcileID": "c5efdf24-0dcc-46a2-8e5b-42b33ddb0dff", "error": "Deployment.apps \"openshift-gitops-server\" is invalid: spec.template.spec.initContainers[0].volumeMounts[0].name: Not found: \"extensions\""} sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).reconcileHandler /remote-source/deps/gomod/pkg/mod/sigs.k8s.io/controller-runtime@v0.17.2/pkg/internal/controller/controller.go:329 sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem /remote-source/deps/gomod/pkg/mod/sigs.k8s.io/controller-runtime@v0.17.2/pkg/internal/controller/controller.go:266 sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func2.2 /remote-source/deps/gomod/pkg/mod/sigs.k8s.io/controller-runtime@v0.17.2/pkg/internal/controller/controller.go:227

       

       

      Additional Info

      Jonathan West had a quick look at this and it appears that the issue is caused by a code change to support the Rollouts Extension where it is hard-coded to remove any volumes that are named `extensions`.

      https://github.com/argoproj-labs/argocd-operator/blob/a0b3b74082b7a6fcc13b37977e213a10cb85faf1/controllers/argocd/deployment.go#L1591

      Problem Reproduction

      • Add an extension to the server component that uses a volume of `extensions`

      Reproducibility

      • Aalways

      Prerequisites/Environment

      • OpenShift GitOps 1.15 or later

      Steps to Reproduce

      Expected Results

      • Server Deployment and Pods should be updated with Extension

      Actual Results

      • Reconcilliation fails with error message, no update made to server pods

      Workaround (If Possible)

      • Do not use `extensions` as the volume name, unfortunately all of the upstream Argo CD examples use this so people will likely run into this.

      Acceptance Criteria

      • Can deploy extensions that use volumes named `extensions`

      Definition of Done

      • Code Complete:
        • All code has been written, reviewed, and approved.
      • Tested:
        • Unit tests have been written and passed.
        • Ensure code coverage is not reduced with the changes.
        • Integration tests have been automated.
        • System tests have been conducted, and all critical bugs have been fixed.
        • Tested and merged on OpenShift either upstream or downstream on a local build.
      • Documentation:
        • User documentation or release notes have been written (if applicable).
      • Build:
        • Code has been successfully built and integrated into the main repository / project.
        • Midstream changes (if applicable) are done, reviewed, approved and merged.
      • Review:
        • Code has been peer-reviewed and meets coding standards.
        • All acceptance criteria defined in the user story have been met.
        • Tested by reviewer on OpenShift.
      • Deployment:
        • The feature has been deployed on OpenShift cluster for testing.

              Unassigned Unassigned
              gnunn@redhat.com Gerald Nunn
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated: