Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: use helm chart namespace when collecting resources #126

Merged
merged 1 commit into from
Oct 15, 2023

Conversation

gianlucam76
Copy link
Member

When a ClusterProfile is using configuration drift detection:

  1. addon-controller gets list of deployed resources
  2. passes this information in a ResourceSummary to drift-detection-manager
  3. drift-detection-manager starts watching those resources and when it detects a configuration drift, drift-detection-manager reports it to management cluster causing a new reconciliation

With respect to Helm charts, addon-controller gets list of deployed resources using helm SDK and using manifest.
In certain scenarios, like this one manifest does not contain namespace for namespace resources like deployments.

If namespace is not set for namespace resource, point #3 won't work.

This PR fixes that. When drift-detection-manager gets resources deployed by addon-controller because of an Helm chart, it adds the helm chart namespace. This information is later on processed with dynamic.ResourceInterface which ignores namespace for cluster wide.

When a ClusterProfile is using configuration drift detection:

1. addon-controller gets list of deployed resources
2. passes this information in a ResourceSummary to drift-detection-manager
3. drift-detection-manager starts watching those resources and when it
detects a configuration drift, drift-detection-manager reports it to
management cluster causing a new reconciliation

With respect to Helm charts, addon-controller gets list of deployed
resources using helm SDK and using manifest.
In certain scenarios, like this [one](projectsveltos/addon-controller#363)
manifest does not contain namespace for namespace resources like deployments.

If namespace is not set for namespace resource, point projectsveltos#3 won't work.

This PR fixes that. When drift-detection-manager gets resources deployed
by addon-controller because of an Helm chart, it adds the helm chart namespace.
This information is later on processed with dynamic.ResourceInterface which
ignores namespace for cluster wide.
@gianlucam76 gianlucam76 merged commit 5b3d0b2 into projectsveltos:dev Oct 15, 2023
3 checks passed
@gianlucam76 gianlucam76 deleted the fix-363 branch October 15, 2023 07:13
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.

1 participant