Skip to main content

☑️ Ensure ConfigMap is recognized by ArgoCD

A relevant ConfigMap resource that isn’t labeled with app.kubernetes.io/part-of: argocd will not be used by Argo CD.

Targeted objects by this rule (types of kind): ConfigMap

Enabled by default? True

Policy as code identifier: ARGO_CONFIGMAP_MISSING_PART_OF_LABEL_VALUE_ARGOCD


This rule will fail

If the app.kubernetes.io/part-of label is not set, or set to anything other than 'argocd':

kind: ConfigMap
metadata:
  labels:
    app.kubernetes.io/name: argocd-cm
kind: ConfigMap
metadata:
  labels:
    app.kubernetes.io/part-of: somethingElse

Rule output in the CLI

$ datree test *.yaml

>> File: failExample.yaml
❌ Ensure ConfigMap is recognized by ArgoCD [1 occurrence]
💡 Incorrect value for annotation `app.kubernetes.io/part-of` - value should be `argocd`, or ArgoCD won't recognize this resource

How to fix this failure

Set the app.kubernetes.io/part-of key with a value of 'argocd':

kind: ConfigMap
metadata:
  labels:
    app.kubernetes.io/part-of: argocd

Read more