Repository navigation
Feat | Add --include-helm-hooks flag - #500
Merged
dag-andersen merged 2 commits intoOct 17, 2026
Merged
Conversation
Helm hook resources were removed unconditionally inside both render paths. Remove them once in main after rendering instead, unless --include-helm-hooks is set, so the diff and the manifest outputs can include them. App-of-apps child discovery keeps skipping hook documents. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Owner
|
@lmbaschiera Thank you so much for this PR! I think it's a great feature overall. I'll take a closer look over the weekend. Sorry for the slow reply! I'll have more time to review PRs and add features after KubeCon in November! |
Contributor
Author
|
@dag-andersen - No worries at all! Really appreciate all the effort you pour into this project. Good luck in the KubeCon! |
dag-andersen
approved these changes
Oct 17, 2026
dag-andersen
left a comment
Owner
There was a problem hiding this comment.
I ran the tests and everything seems to work as expected 🚀 Overall looks good 🥇 Thank you for the PR
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds
--include-helm-hooks(INCLUDE_HELM_HOOKS, defaultfalse). When set, resources annotatedhelm.sh/hookstay in the diff and in the--output-app-manifests/--output-branch-manifestsfiles, exactly as Argo CD rendered them. Without the flag, output is unchanged.extract.getManifestsFromAppandreposerverextract.renderApp).cmd/main.gonow removes them once after rendering, through a newextract.RemoveHelmHooks, unless the flag is set.--traverse-app-of-apps) still skips hook-annotated documents, so which child Applications get rendered doesn't depend on the flag.docs/options.md, new section indocs/output.md.Fixes #499
Testing
go test ./cmd/... ./pkg/..., including a newTestRemoveHelmHooksgolangci-lint runon the changed packages: 0 issuesbranch-2/target-1: the existing branch-2 data with--include-helm-hooks. The chart'shelm.sh/hook: testPod is renamed along with the Deployment and now appears in the diff.TEST_CASE="branch-2/target" … -dockerstill passes against its existing golden output, which leaves that hook Pod out, so the default is unchanged.