fix(module): avoid queue blocking on invalid module config#2246
Open
LopatinDmitr wants to merge 7 commits intomainfrom
Open
fix(module): avoid queue blocking on invalid module config#2246LopatinDmitr wants to merge 7 commits intomainfrom
LopatinDmitr wants to merge 7 commits intomainfrom
Conversation
6879c20 to
08d1f3f
Compare
Signed-off-by: Dmitry Lopatin <dmitry.lopatin@flant.com>
08d1f3f to
1277d66
Compare
Signed-off-by: Dmitry Lopatin <dmitry.lopatin@flant.com>
Signed-off-by: Dmitry Lopatin <dmitry.lopatin@flant.com>
Signed-off-by: Dmitry Lopatin <dmitry.lopatin@flant.com>
66d3766 to
6141369
Compare
Signed-off-by: Dmitry Lopatin <dmitry.lopatin@flant.com>
Signed-off-by: Dmitry Lopatin <dmitry.lopatin@flant.com>
Signed-off-by: Dmitry Lopatin <dmitry.lopatin@flant.com>
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.
Description
Make virtualization module config validation tolerate empty or incomplete
spec.settingsand ensure hooks that patch values only reconcile when a valid copied module config exists.This change keeps
validate-module-configas the single source of truth for config validity:virtualization.internal.moduleConfigvirtualization.internal.moduleConfigValidationHooks and templates that depend on module config now use the copied internal config contract consistently.
Why do we need it, and what problem does it solve?
During installation the
ModuleConfig/virtualizationobject may appear before the validating webhook is ready, so an empty or incompletespec.settingscan temporarily exist in the cluster.Previously this could lead to two failure modes:
validate-module-configcould panic while accessing missing required settings.With this change, config validation errors are reported cleanly through readiness, invalid settings never overwrite the copied internal config, and hooks that patch values only run when a valid copied config is available.
What is the expected result?
ModuleConfig/virtualizationwith empty or incompletespec.settings.validate-module-configdoes not panic and stores a validation error.virtualization.internal.moduleConfig.Checklist
Changelog entries