Skip to content

ArgoCD - Allow configuring resource requests/limits for copyutil initContainer in repo-server pod #3504

@jakuboskera

Description

@jakuboskera

Describe the bug

There is currently no way to configure resource requests or limits for the copyutil initContainer in the repo-server pod.
The Helm chart only exposes repoServer.resources, which are applied at the Pod level and thus inherited by all containers, including initContainers.

In some environments, the main repo-server container may be configured with large resources (e.g., 100Gi memory) to handle large Helm charts or Git repositories.
However, copyutil does not need such high resources, yet it ends up with the same values, which leads to unnecessarily high scheduling requirements and suboptimal resource utilization across the cluster.

This can significantly impact cluster scheduling, especially in resource-constrained environments.

It would be beneficial to expose a separate configuration block for the copyutil initContainer, e.g.:

repoServer:
  initContainers:
    copyutil:
      resources:
        requests:
          memory: 64Mi
          cpu: 50m
        limits:
          memory: 128Mi
          cpu: 100m

Related helm chart

argo-cd

Helm chart version

To Reproduce

  1. in charts/argo-cd/values.yaml set

    repoServer:
       resources:
         requests:
           memory: 64Mi
           cpu: 100m
         limits:
           memory: 128Mi
           cpu: 200m
  2. Update Chart deps

    helm dep up charts/argo-cd
  3. Use Helm template and see resources of copyutil initContainer

    $ helm template argocd charts/argo-cd -s templates/argocd-repo-server/deployment.yaml | \
      yq e '.spec.template.spec.initContainers[] | select(.name == "copyutil") | .resources'
    resources:
      limits:
        cpu: 200m
        memory: 128Mi
      requests:
        cpu: 100m
        memory: 64Mi

Expected behavior

Ability to configure resources per initContainers.

Screenshots

No response

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    argo-cdbugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions