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

Expose "extraargs" to be passed to repo server command line options

    • 8
    • False
    • None
    • False
    • Hide
      With this update, Users will be able to pass command arguments to the repo-server deployment using Argo CD CR.

      For example:
      ```
      apiVersion: argoproj.io/v1alpha1
      kind: ArgoCD
      metadata:
        name: example-argocd
      spec:
        repo:
          extraRepoCommandArgs:
            - --foo
            - bar
      ```
      Show
      With this update, Users will be able to pass command arguments to the repo-server deployment using Argo CD CR. For example: ``` apiVersion: argoproj.io/v1alpha1 kind: ArgoCD metadata:   name: example-argocd spec:   repo:     extraRepoCommandArgs:       - --foo       - bar ```
    • GITOPS Sprint 230

      Story (Required)

      As an administrator trying to provision OpenShift GitOps using GitOps Operator I want to pass command line arguments to Repo Server.

      To goal of this story to add the ability pass arbitrary command line arguments to Repo Server.

      Background (Required)

      <Describes the context or background related to this story>

      Argo CD fixed this security vulnerably . However, to apply the fix, users need to set --reposerver.max.combined.directory.manifests.size command line arguments to start the repo server. Currently, GitOps Operator does not support passing this options or "extraargs" option.

      Out of scope

      <Defines what is not included in this story>

      Approach (Required)

      <Description of the general technical path on how to achieve the goal of the story. Include details like json schema, class definitions>

      Support "extraargs" option which is already supported by argocd server command. 

      Dependencies

      <Describes what this story depends on. Dependent Stories and EPICs should be linked to the story.>

      Acceptance Criteria (Mandatory)

      • Users can pass "extraargs" option to repo server in GitOps Operator
      • Add unit tests and end to end tests
      • Propagate fix to mid-stream and built and tested in CPaaS successfully

      INVEST Checklist

      Dependencies identified

      Blockers noted and expected delivery timelines set

      Design is implementable

      Acceptance criteria agreed upon

      Story estimated

      Legend

      Unknown

      Verified

      Unsatisfied

      Done Checklist

      • Code is completed, reviewed, documented and checked in
      • Unit and integration test automation have been delivered and running cleanly in continuous integration/staging/canary environment
      • Continuous Delivery pipeline(s) is able to proceed with new code included
      • Customer facing documentation, API docs etc. are produced/updated, reviewed and published
      • Acceptance criteria are met

            [GITOPS-2445] Expose "extraargs" to be passed to repo server command line options

            Errata Tool added a comment -

            Since the problem described in this issue should be resolved in a recent advisory, it has been closed.

            For information on the advisory (Errata Advisory for OpenShift GitOps v1.8.0), and where to find the updated files, follow the link below.

            If the solution does not work for you, open a new bug report.
            https://access.redhat.com/errata/RHEA-2023:1307

            Errata Tool added a comment - Since the problem described in this issue should be resolved in a recent advisory, it has been closed. For information on the advisory (Errata Advisory for OpenShift GitOps v1.8.0), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHEA-2023:1307

            Abhishek Veeramalla added a comment - - edited

            I re-looked in to the Argo CD code, I think we can pass the below parameter in to configure the max combined directory manifests size
            ```
            --max-combined-directory-manifests-size
            ```

            This is slightly similar to what we can pass in the `argocd-cmd-params-cm` configmap.

            So, using the operator below Argo CD CR configuration should work.

            ```
              repo:
                extraRepoCommandArgs:
                - --max-combined-directory-manifests-size
                - 10M
            ```

            Abhishek Veeramalla added a comment - - edited I re-looked in to the Argo CD code, I think we can pass the below parameter in to configure the max combined directory manifests size ``` --max-combined-directory-manifests-size ``` This is slightly similar to what we can pass in the `argocd-cmd-params-cm` configmap. So, using the operator below Argo CD CR configuration should work. ```   repo:     extraRepoCommandArgs:     - --max-combined-directory-manifests-size     - 10M ```

            William Tam added a comment -

            jgwest It turns out that I misread the fix a bit. We do not pass `reposerver.max.combined.directory.manifests.size` param in the command line but in `argocd-cmd-params-cm` configmap instead. The operator does not reconcile that configmap Can GitOps Service setup configure that parameter in the configmap? There is probably a sensible default value which may be acceptable without making changes.

            William Tam added a comment - jgwest It turns out that I misread the fix a bit. We do not pass `reposerver.max.combined.directory.manifests.size` param in the command line but in `argocd-cmd-params-cm` configmap instead. The operator does not reconcile that configmap Can GitOps Service setup configure that parameter in the configmap? There is probably a sensible default value which may be acceptable without making changes.

            Abhishek Veeramalla added a comment - PR: https://github.com/argoproj-labs/argocd-operator/pull/844

            @wtam_at_redhat another option could be to expose this in the ArgoCD CR, like here: https://github.com/argoproj-labs/argocd-operator/blob/853cb9fe621850a06c7be2d0ceb60e264b3a9749/api/v1alpha1/argocd_types.go#L394

            But the proposed solution also works for us (GitOps Service). It's up to y'all what you think is best here.

            Jonathan West added a comment - @ wtam_at_redhat another option could be to expose this in the ArgoCD CR, like here: https://github.com/argoproj-labs/argocd-operator/blob/853cb9fe621850a06c7be2d0ceb60e264b3a9749/api/v1alpha1/argocd_types.go#L394 But the proposed solution also works for us (GitOps Service). It's up to y'all what you think is best here.

              aveerama@redhat.com Abhishek Veeramalla
              wtam_at_redhat William Tam
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: