Repository navigation
Add fv test for drift detection of a Helm deployed custom resource in agentless mode - #2113
Merged
gianlucam76 merged 1 commit intoNov 20, 2026
Conversation
… agentless mode When drift-detection-manager runs in the management cluster, the kinds deployed by Helm charts must be resolved against the managed cluster. If a chart deploys a custom resource with no namespace, and its CRD is only in the managed cluster, drift-detection-manager failed with "no matches for kind" and the ResourceSummary tracked nothing (helmResourceHashes stayed empty). The test installs a cluster scoped CRD in the workload cluster only, deploys with ContinuousWithDriftDetection a Helm chart (bedag/raw) rendering an instance of it with no namespace, and verifies the ResourceSummary tracks that instance. None of the existing specs could catch this: the ones going through Helm render only built-in kinds, or custom kinds with a namespace set, and the one with a CRD only in the managed cluster deploys through policyRefs, which never uses the REST mapper. This PR also updates the drift-detection-manager which contains the fix Fixes projectsveltos#2112
gianlucam76
added a commit
to gianlucam76/addon-controller
that referenced
this pull request
Nov 20, 2026
… agentless mode (projectsveltos#2113) When drift-detection-manager runs in the management cluster, the kinds deployed by Helm charts must be resolved against the managed cluster. If a chart deploys a custom resource with no namespace, and its CRD is only in the managed cluster, drift-detection-manager failed with "no matches for kind" and the ResourceSummary tracked nothing (helmResourceHashes stayed empty). The test installs a cluster scoped CRD in the workload cluster only, deploys with ContinuousWithDriftDetection a Helm chart (bedag/raw) rendering an instance of it with no namespace, and verifies the ResourceSummary tracks that instance. None of the existing specs could catch this: the ones going through Helm render only built-in kinds, or custom kinds with a namespace set, and the one with a CRD only in the managed cluster deploys through policyRefs, which never uses the REST mapper. This PR also updates the drift-detection-manager which contains the fix Fixes projectsveltos#2112 (cherry picked from commit cafc00c)
gianlucam76
added a commit
that referenced
this pull request
Nov 20, 2026
… agentless mode (#2113) (#2114) When drift-detection-manager runs in the management cluster, the kinds deployed by Helm charts must be resolved against the managed cluster. If a chart deploys a custom resource with no namespace, and its CRD is only in the managed cluster, drift-detection-manager failed with "no matches for kind" and the ResourceSummary tracked nothing (helmResourceHashes stayed empty). The test installs a cluster scoped CRD in the workload cluster only, deploys with ContinuousWithDriftDetection a Helm chart (bedag/raw) rendering an instance of it with no namespace, and verifies the ResourceSummary tracks that instance. None of the existing specs could catch this: the ones going through Helm render only built-in kinds, or custom kinds with a namespace set, and the one with a CRD only in the managed cluster deploys through policyRefs, which never uses the REST mapper. This PR also updates the drift-detection-manager which contains the fix Fixes #2112 (cherry picked from commit cafc00c)
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.
When drift-detection-manager runs in the management cluster, the kinds deployed by Helm charts must be resolved against the managed cluster. If a chart deploys a custom resource with no namespace, and its CRD is only in the managed cluster, drift-detection-manager failed with "no matches for kind" and the ResourceSummary tracked nothing (helmResourceHashes stayed empty).
The test installs a cluster scoped CRD in the workload cluster only, deploys with ContinuousWithDriftDetection a Helm chart (bedag/raw) rendering an instance of it with no namespace, and verifies the ResourceSummary tracks that instance.
None of the existing specs could catch this: the ones going through Helm render only built-in kinds, or custom kinds with a namespace set, and the one with a CRD only in the managed cluster deploys through policyRefs, which never uses the REST mapper.
This PR also updates the drift-detection-manager which contains the fix
Fixes #2112