Skip to content

feat: add selector-based ignoreResourceUpdates config for orphaned resources#28223

Open
maheshz09 wants to merge 2 commits into
argoproj:masterfrom
maheshz09:feat/ignore-orphaned-resource-updates
Open

feat: add selector-based ignoreResourceUpdates config for orphaned resources#28223
maheshz09 wants to merge 2 commits into
argoproj:masterfrom
maheshz09:feat/ignore-orphaned-resource-updates

Conversation

@maheshz09

Copy link
Copy Markdown

Summary

Fixes #28099

Currently the only way to apply ignoreResourceUpdates behavior to
orphaned resources (managed by operators) is by setting the annotation
argocd.argoproj.io/ignore-resource-updates: "true" via Kyverno
mutating policies. This adds a native config option in argocd-cm.

Changes

  • Added resource.orphaned.ignore.namePatterns config key in argocd-cm
  • Added OrphanedResourceIgnoreConfig struct and GetOrphanedResourceIgnoreConfig() in util/settings
  • Added isOrphanedResourceIgnored() helper in appcontroller
  • Orphaned resources matching configured name patterns are now skipped during reconciliation
  • Unit tests added for all cases

Usage

Add to argocd-cm:

resource.orphaned.ignore.namePatterns: |
  namePatterns:
    - "*-cluster-config-map"
    - "*-config-map"
    

Testing
- All new unit tests passing
- All existing orphan-related tests passing
- No breaking changes, defaults unchanged

@maheshz09 maheshz09 requested a review from a team as a code owner June 10, 2026 13:07
@bunnyshell

bunnyshell Bot commented Jun 10, 2026

Copy link
Copy Markdown

🔴 Preview Environment stopped on Bunnyshell

See: Environment Details | Pipeline Logs

Available commands (reply to this comment):

  • 🔵 /bns:start to start the environment
  • 🚀 /bns:deploy to redeploy the environment
  • /bns:delete to remove the environment

@maheshz09 maheshz09 force-pushed the feat/ignore-orphaned-resource-updates branch from 405fafb to ac63c1f Compare June 10, 2026 13:32
@codecov

codecov Bot commented Jun 10, 2026

Copy link
Copy Markdown

Bundle Report

Bundle size has no change ✅

Adds support for configuring ignoreResourceUpdates behavior for
orphaned resources via name patterns in argocd-cm, removing the
need for external tools like Kyverno to inject annotations.

Operators can now configure in argocd-cm:
  resource.orphaned.ignore.namePatterns: |
    namePatterns:
      - "*-cluster-config-map"
      - "*-config-map"

Fixes argoproj#28099

Signed-off-by: Mahesh Pansare <maheshpansare099+github@gmail.com>
@maheshz09 maheshz09 force-pushed the feat/ignore-orphaned-resource-updates branch from ac63c1f to d3dfa64 Compare June 11, 2026 11:16
Signed-off-by: Mahesh Pansare <138249606+maheshz09@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Better way to define resource updates to ignore for untracked (orphaned) resources

1 participant