Skip to content

feat: allow excluding ArgoCD and Flux resources from Zarf Agent mutation - #5224

Open
colinlodter wants to merge 4 commits into
zarf-dev:mainfrom
colinlodter:5184_mutation_exclusions
Open

feat: allow excluding ArgoCD and Flux resources from Zarf Agent mutation#5224
colinlodter wants to merge 4 commits into
zarf-dev:mainfrom
colinlodter:5184_mutation_exclusions

Conversation

@colinlodter

Copy link
Copy Markdown

Description

Adds a configurable YAML list for excluding Argo CD and Flux resources from Zarf Agent mutation.

The AGENT_MUTATION_EXCLUSIONS Zarf package variable is passed to the agent Helm chart as mutationExclusions. When configured, the chart omits the corresponding mutating webhook entries:

  • argocd excludes Applications, ApplicationSets, repository and repo-creds Secrets, and AppProjects.
  • flux excludes GitRepositories, OCIRepositories, and HelmRepositories.

Pod mutation remains enabled regardless of these exclusions. When the list is empty, the agent retains its existing behavior and creates all webhooks.

Related Issue

Fixes #5184

Checklist before merging

@colinlodter
colinlodter requested review from a team as code owners August 14, 2026 15:05
@netlify

netlify Bot commented Aug 14, 2026

Copy link
Copy Markdown

Deploy Preview for zarf-docs canceled.

Name Link
🔨 Latest commit 8802df8
🔍 Latest deploy log https://app.netlify.com/projects/zarf-docs/deploys/6a7f37896e70bf0008117d62

@colinlodter
colinlodter force-pushed the 5184_mutation_exclusions branch from 4af2c05 to e5d5c65 Compare August 14, 2026 15:09
colinlodter and others added 3 commits August 14, 2026 11:42
Signed-off-by: Colin Lodter <colin@defenseunicorns.com>
Signed-off-by: Colin Lodter <colin@defenseunicorns.com>
…4.3 (zarf-dev#5221)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Signed-off-by: Colin Lodter <colin@defenseunicorns.com>
@colinlodter
colinlodter force-pushed the 5184_mutation_exclusions branch from 3778358 to 73b164d Compare August 14, 2026 15:42

@AustinAbro321 AustinAbro321 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Implementation looks good thanks! One small docs request

- `flux` — excludes GitRepository, OCIRepository, and HelmRepository resources.
- `argocd` — excludes Application, ApplicationSet, repository and repo-creds Secrets, and AppProject resources.

Excluding the Argo CD or Flux resource group does not disable Pod mutation for workloads created by that controller.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Excluding the Argo CD or Flux resource group does not disable Pod mutation for workloads created by that controller.

nit: delete for brevity, unlikely anyone mistakes this

@github-project-automation github-project-automation Bot moved this to In progress in Zarf Aug 14, 2026
@codecov

codecov Bot commented Aug 14, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: In progress

Development

Successfully merging this pull request may close these issues.

Allow excluding ArgoCD and Flux resources from Zarf Agent mutation

2 participants