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

Set ARGOCD_API_SERVER_REPLICAS env when .spec.server.replicas is configured.

XMLWordPrintable

    • 3
    • False
    • Hide

      None

      Show
      None
    • False
    • GitOps Scarlet Sprint 15, GitOps Scarlet Sprint 16

      Description of Problem

      Operator supports scaling the argocd-server deployment using `spec.server.replicas` field in ArgoCD CR. When set, Operator creates the required number of replica pods. However, for Argo CD to limit the concurrent login requests properly when more than 1 replicas is present for server, it needs to be made aware on number of replicas using ARGOCD_API_SERVER_REPLICAS env in the deployment which the operator doesn't set. 

      Note that this bug doesn't impact the server's core functionality. It just fails to enforce limits on login request since the ARGOCD_API_SERVER_REPLICAS env var is missing.

      Additional Info

      Problem Reproduction

      • Refer Steps to reproduce section below

      Reproducibility

      • Always

      Prerequisites/Environment

      • GitOps Operator or Argo CD Operator

      Steps to Reproduce

      • Install GitOps Operator
      • Set `spec.server.replicas: 3` in ArgoCD CR
      • Ensure 3 replica server pods are created 
      • Check ARGOCD_API_SERVER_REPLICAS env in server deployment

      Expected Results

      • ARGOCD_API_SERVER_REPLICAS env in server deployment is set to number of server replicas

      Actual Results

      • No ARGOCD_API_SERVER_REPLICAS env is present in the server deployment

      Workaround (If Possible)

      • Manually add the required ARGOCD_API_SERVER_REPLICAS env var using `spec.server.env` field in ArgoCD CR when .spec.server.replicas is set

      Fix Approaches

      Acceptance Criteria

      • Required logic is in place to add the env
      • unit test is added
      • e2e test is added (if required)

      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
              rh-ee-sghadi Siddhesh Ghadi
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: