← Back to snippets

ArgoCD ignoreDifferences Patterns

January 18, 2026Salih Kayiplar

argocd
gitops
kubernetes
configuration

Ignore operator-managed labels

spec:
  ignoreDifferences:
    - group: opentelemetry.io
      kind: Instrumentation
      name: otel-java-instrumentation
      jqPathExpressions:
        - .metadata.labels."app.kubernetes.io/instance"

Ignore kubectl restartedAt annotation

spec:
  ignoreDifferences:
    - group: apps
      kind: Deployment
      name: gitlab-controller-manager
      jqPathExpressions:
        - .spec.template.metadata.annotations."kubectl.kubernetes.io/restartedAt"

Ignore revision annotation on all Deployments

spec:
  ignoreDifferences:
    - group: apps
      kind: Deployment
      jqPathExpressions:
        - .metadata.annotations."deployment.kubernetes.io/revision"

Ignore all managed fields (useful for CRDs)

spec:
  ignoreDifferences:
    - group: "*"
      kind: "*"
      managedFieldsManagers:
        - kube-controller-manager

Cluster-wide default (argocd-cm ConfigMap)

data:
  resource.customizations.ignoreDifferences.all: |
    jqPathExpressions:
      - .metadata.managedFields

Gotcha

  • Keys with dots/slashes need quotes in jqPathExpressions: .metadata.labels."app.kubernetes.io/instance"
  • jsonPointers alternative uses ~1 for slashes: /metadata/annotations/kubectl.kubernetes.io~1restartedAt
  • Be specific with name, group, kind — wildcards mask real drift

Ready to scale your cloud infrastructure?

Let's discuss how CloudCops can help you build secure, scalable, and modern DevOps workflows. Schedule a free discovery call today.