ArgoCD
resource management
sync prevention
DevOps
Kubernetes

Prevent ArgoCD from syncing a single ressource

System Design practice on Codemia

Work through 120+ system design problems with detailed solutions, from rate limiters to multi-region storage.

Practice system design

Introduction

In Argo CD, "prevent syncing a single resource" can mean several different things: do not apply changes to it, do not prune it, do not mark drift on certain fields, or stop reconciling an entire application. Those are not the same feature. For a single resource, the right answer depends on which behavior you actually want.

First: Argo CD Does Not Have a Simple "Ignore This One Manifest Completely" Switch

If a resource is inside the application's tracked source path, Argo CD generally considers it part of the desired state. There is no universal per-resource toggle that says "track this app, but never sync that one manifest at all" in the same simple way that people often expect.

That is why the cleanest long-term solution is often structural:

  • move the resource to a different Application
  • move it out of the tracked path
  • template it conditionally so it is not emitted for that environment

If the requirement is permanent, architecture is usually better than patching around sync behavior.

Option 1: Prevent Pruning Only

If you want Argo CD to stop deleting one resource when it disappears from Git, use the per-resource sync option:

yaml
metadata:
  annotations:
    argocd.argoproj.io/sync-options: Prune=false

This does not stop Argo CD from applying updates to the resource when it still exists in the desired manifests. It only prevents pruning.

Option 2: Ignore Differences on Specific Fields

If the real problem is that one resource drifts on fields managed elsewhere, use ignoreDifferences in the Application spec:

yaml
1spec:
2  ignoreDifferences:
3    - group: apps
4      kind: Deployment
5      name: my-app
6      namespace: default
7      jsonPointers:
8        - /spec/replicas

That tells Argo CD to stop treating those fields as drift. This is often what teams actually want when an HPA or another controller is updating a field.

It does not mean "never sync the resource." It means "ignore selected differences."

Option 3: Ignore Extraneous Resources

If a resource exists in the cluster but should not affect sync status, argocd.argoproj.io/compare-options: IgnoreExtraneous can help in the right scenario:

yaml
metadata:
  annotations:
    argocd.argoproj.io/compare-options: IgnoreExtraneous

This affects comparison behavior for extra resources. It is not a general replacement for excluding a tracked manifest from sync.

Option 4: Skip Reconcile Is for Applications

Argo CD documents argocd.argoproj.io/skip-reconcile: "true" as an annotation on the Application resource. That pauses reconciliation of the whole application, not just one child resource.

So if someone suggests skip-reconcile for a single Deployment inside the app, that is the wrong scope.

What Usually Works Best

Choose based on intent:

  • resource should not exist in this app at all: remove or split it
  • resource should exist but not be pruned: use Prune=false
  • resource should exist but some fields should be ignored: use ignoreDifferences
  • whole app should pause reconciliation: use skip-reconcile on the Application

That decision tree is much more reliable than looking for a single magic annotation.

Common Pitfalls

The biggest mistake is expecting Prune=false to stop all synchronization for a resource. It only affects pruning.

Another mistake is using ignoreDifferences when the real requirement is architectural separation of ownership.

A third issue is applying skip-reconcile and accidentally pausing the whole Application when only one resource was problematic.

Summary

  • Argo CD has different controls for pruning, diffing, and full application reconciliation.
  • There is no simple universal per-resource "never sync this tracked manifest" switch.
  • Use Prune=false only to prevent deletion.
  • Use ignoreDifferences when specific fields drift under external control.
  • If one resource truly should not be managed by that Application, split ownership instead of fighting the sync engine.

Related reading
Course
Beginner
27 lessons
10 hours
System Design Fundamentals

Build a strong foundation in designing scalable, reliable distributed systems.

View the course
Track what you have practised

A free account saves your progress, solutions and study plan across every problem on Codemia.

System Design practice on Codemia

Work through 120+ system design problems with detailed solutions, from rate limiters to multi-region storage.

Practice system design

All Rights Reserved.