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

After Upgrade to v.1.16 not able to add --metrics-application-labels in spec.controller.extraCommandArgs with multiple values

XMLWordPrintable

    • 5
    • False
    • Hide

      None

      Show
      None
    • False
    • Hide
      Before this update, the extraCommandArgs field in the Argo CD CR did not allow using the same flag multiple times, even with different values. Only the last occurrence of a repeated flag was included in the controller pod. This prevented flags like --metrics-application-labels from being set with multiple values.

      After this update, repeated flags in extraCommandArgs are correctly supported. Flags like --metrics-application-labels can now be specified multiple times with different values, and all instances will be included in the controller pod.
      Show
      Before this update, the extraCommandArgs field in the Argo CD CR did not allow using the same flag multiple times, even with different values. Only the last occurrence of a repeated flag was included in the controller pod. This prevented flags like --metrics-application-labels from being set with multiple values. After this update, repeated flags in extraCommandArgs are correctly supported. Flags like --metrics-application-labels can now be specified multiple times with different values, and all instances will be included in the controller pod.
    • GitOps Scarlet Sprint 14, GitOps Scarlet Sprint 15

      Description of Problem

      • GITOPS-5200, After the fix, extraCommandArgs is not accepting multiple entries of same command for same and even for different values.
      • Due the above fix, commands like `--metrics-application-labels` cannot be added with multiple different values.

      Additional Info

      • Using it like below does add it in pod yaml but it doesn't work as expected
      spec:
        controller:
          extraCommandArgs:
          - --metrics-application-labels
          - application.argoproj.io/template-version
          - application.argoproj.io/chart-version 
       

      Reproducibility

      • Always

      Prerequisites/Environment

      • OpenShift GitOps v1.16.0

      Steps to Reproduce

      • Update `spec.controller.extraCommandArgs` like below:
      spec:
        controller:
          extraCommandArgs:
          - --metrics-application-labels
          - application.argoproj.io/template-version
          - --metrics-application-labels
          - application.argoproj.io/chart-version

       

      Expected Results

      • in controller pod yaml
      containers:
        - command:
          - argocd-application-controller
          [...]
          - --metrics-application-labels
          - application.argoproj.io/template-version
          - --metrics-application-labels 
          - application.argoproj.io/chart-version

      Actual Results

      • in controller pod yaml
      containers:
        - command:
          - argocd-application-controller
          [...]
          - --metrics-application-labels 
          - application.argoproj.io/chart-version

      Problem Analysis

      • <Completed by engineering team as part of the triage/refinement process>

      Root Cause

      • GITOPS-5200, After the bug fix  extraCommandArgs is not accepting multiple entries of same command for same and even for different values.

      Workaround (If Possible)

      • No

      Fix Approaches

      • <If we decide to fix this bug, how will we do it?>

      Acceptance Criteria

      • ...

      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.

              rh-ee-rnaaz Rizwana Naaz
              rhn-support-sburhade Satyam Burhade
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: