🌱 fix: make installImage.partitions optional, when imageURLCommand gets used. - #2124
Open
guettli wants to merge 5 commits into
Open
🌱 fix: make installImage.partitions optional, when imageURLCommand gets used.#2124guettli wants to merge 5 commits into
guettli wants to merge 5 commits into
Conversation
…dation with imageURLCommand partitions is unused when imageURLCommand is set — the controller takes a completely different code path. The CRD previously marked it required, forcing users to supply dummy partition data for imageURLCommand-based provisioning. Changes: - Add omitempty to Partitions in v1beta1 and v1beta2 types; drop it from the CRD required list - Webhook validation now rejects partitions when imageURLCommand is set, and requires partitions when imageURLCommand is not set - Regenerate CRDs Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> # Committing as: thomas.guettler@syself.com
Partitions are ignored when imageURLCommand is set, but keeping them is harmless — someone may want them for documentation or future use. Remove the restriction that banned setting partitions alongside imageURLCommand. Only the positive rule remains: partitions must be non-empty when imageURLCommand is not set. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> # Committing as: thomas.guettler@syself.com
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> # Committing as: thomas.guettler@syself.com
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> # Committing as: thomas.guettler@syself.com
janiskemper
requested changes
Aug 27, 2026
|
|
||
| // Partitions define the additional Partitions to be created in installimage. | ||
| Partitions []Partition `json:"partitions"` | ||
| // Must be non-empty when imageURLCommand is not set. |
Contributor
There was a problem hiding this comment.
we now call it "customProvisioner". Can you update it everywhere? If this PR is rebased, it should contain already the API changes and the new name.
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.
Summary
partitionsis completely ignored whenimageURLCommandis set — the controller takes a different code path that never builds an installimage config. The CRD previously marked the field required in all cases, forcing users to supply dummy partition data for imageURLCommand-based provisioning.partitionsoptional in the API types (omitempty), dropping it from the CRDrequiredlist.imageURLCommandis not set (installimage needs at least one partition). WhenimageURLCommandis set, partitions are optional — they're ignored by the controller, but may still be set if desired.