(bug) Helm deployment: react to patches changes#1686
Merged
gianlucam76 merged 1 commit intoprojectsveltos:mainfrom Apr 2, 2026
Merged
(bug) Helm deployment: react to patches changes#1686gianlucam76 merged 1 commit intoprojectsveltos:mainfrom
gianlucam76 merged 1 commit intoprojectsveltos:mainfrom
Conversation
Previously, when Helm charts were deployed with patches, the ClusterSummary would enter the Provisioning state, but Sveltos would fail to trigger a redeployment of the helm chart. This occurred because the reconciliation logic only compared the deployed Helm chart version and its values; since these remained unchanged, Sveltos assumed no action was required. Consequently, any modifications introduced via patches were effectively ignored. This PR fixes this behavior by introducing a hash for patches. Sveltos now calculates and stores a hash of the patches defined in the profile and compares it against the previously deployed state. By tracking this hash alongside chart versions and values, Sveltos can accurately detect when patches have changed and trigger the necessary Helm redeployment to bring the cluster into the desired state.
be9f92e to
f4a9b72
Compare
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.
Previously, when Helm charts were deployed with patches, the ClusterSummary would enter the Provisioning state, but Sveltos would fail to trigger a redeployment of the helm chart. This occurred because the reconciliation logic only compared the deployed Helm chart version and its values; since these remained unchanged, Sveltos assumed no action was required. Consequently, any modifications introduced via patches were effectively ignored.
This PR fixes this behavior by introducing a hash for patches. Sveltos now calculates and stores a hash of the patches defined in the profile and compares it against the previously deployed state. By tracking this hash alongside chart versions and values, Sveltos can accurately detect when patches have changed and trigger the necessary Helm redeployment to bring the cluster into the desired state.
Fixes #1671