fix(parameters): backfill absent externalManaged config hash#10166
Merged
fix(parameters): backfill absent externalManaged config hash#10166
Conversation
Collaborator
|
Auto Cherry-pick Instructions |
Contributor
Author
|
/nopick |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #10166 +/- ##
==========================================
+ Coverage 52.15% 52.41% +0.25%
==========================================
Files 529 529
Lines 60078 60097 +19
==========================================
+ Hits 31335 31497 +162
+ Misses 25623 25477 -146
- Partials 3120 3123 +3
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
leon-ape
approved these changes
Apr 23, 2026
kizuna-lek
approved these changes
Apr 23, 2026
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.
Fixes #10167
Summary
This follow-up patch backfills an absent
ConfigHashforexternalManagedconfigs inParameterTemplateExtension.Today
ParameterTemplateExtensionalready resolves the rendered ConfigMap and backfillscomponent.spec.configs[].configMap, but it does not carry the rendered ConfigMap hash back intocomponent.spec.configs[].configHash. That leaves the desired spec incomplete on the initial external-managed path even though the rendered ConfigMap already has a real hash.This patch keeps the fix narrow:
ConfigHashonly when it is absent (nilor empty)config.kubeblocks.io/config-hashConfigHashFlow
In short, this PR records the already-computed rendered ConfigMap fingerprint into the desired spec. It complements
#10163:#10163improves downstream controller robustness for absent-hash representations, while this PR improves upstream desired-state completeness for the initialexternalManagedpath.Why Here
ParameterTemplateExtensionis already the place where the rendered ConfigMap is read and theConfigMapreference is written back intoComponent.spec.configs. Adding the initial hash backfill here keeps the desired spec complete at the source instead of pushing this responsibility down to workload transform.Changes
controllers/parameters/parametertemplateextension_controller.goConfigHashfrom the rendered ConfigMap label during external-managed config updatecontrollers/parameters/parametertemplateextension_controller_test.goComponent.spec.configs[].configHashValidation
Out of Scope
externalManaged && configHash == nil#10163controller absent-hash compatibility fix