Skip to content

Add fv test for drift detection of a Helm deployed custom resource in agentless mode - #2113

Merged
gianlucam76 merged 1 commit into
projectsveltos:mainfrom
gianlucam76:fv-helm-custom-resource-agentless-2112
Nov 20, 2026
Merged

gianlucam76 merged 1 commit into
projectsveltos:mainfrom
gianlucam76:fv-helm-custom-resource-agentless-2112

Conversation

@gianlucam76

Copy link
Copy Markdown
Member

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

… 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
gianlucam76 merged commit cafc00c into projectsveltos:main Nov 20, 2026
13 checks passed
@gianlucam76
gianlucam76 deleted the fv-helm-custom-resource-agentless-2112 branch November 20, 2026 15:43
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)
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.

BUG: drift-detection-manager uses management cluster RESTMapper for ResourceSummary chartResources in agentless mode

1 participant