Skip to content

Application Controller fails with dynamicClusterDistribution in namespaced installations #3758

@maksym-iv

Description

@maksym-iv

Describe the bug

Deploying the ArgoCD with the dynamicCLusterDistribution enabled, getting the permission error from argocd-application-controller pods:

{"level":"fatal","msg":"unable to get shard due to error updating the sharding config map: error creating shard mapping configmap configmaps is forbidden: User \"system:serviceaccount:argo-hub:argocd-application-controller\" cannot create resource \"configmaps\" in API group \"\" in the namespace \"argo-hub\"","time":"2026-02-27T20:57:19Z"}

Apparently, it is related to the #2743 issue.

Unfortunately role with the rule

  - apiGroups:
      - ""
    resources:
      - configmaps
    resourceNames:
      - argocd-app-controller-shard-cm
    verbs:
      - get
      - list
      - watch
      - create
      - update

The service account will not be allowed to create a argocd-app-controller-shard-cm ConfigMap - ref, doc

Probably creating the argocd-app-controller-shard-cm configmap from the templates would solve the issue, currently I'm using another workaround:

extraObjects:
  - apiVersion: v1
    kind: ConfigMap
    metadata:
      name: argocd-app-controller-shard-cm
      namespace: "{{ .Release.Namespace }}"
    data:
      shardControllerMapping: '[]'

Related helm chart

argo-cd

Helm chart version

v3.3.2

To Reproduce

Deploy with values:

createClusterRoles: false
controller:
  name: application-controller
  replicas: 2
  dynamicClusterDistribution: true

Expected behavior

argocd-application-controller should not encounter the permission error.

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