Record installation defaults in the status instead of the spec - #5203
Open
caseydavenport wants to merge 6 commits into
Open
Record installation defaults in the status instead of the spec#5203caseydavenport wants to merge 6 commits into
caseydavenport wants to merge 6 commits into
Conversation
Defaulting seeds from the recorded values, so a user-set field takes over and drops out of the recorded set.
Downstream controllers read the computed spec and wait until the core controller publishes it.
The pool list merges whole, so a declared pool that omits the name dropped the recorded default for it. Per-pool fields now come from the recorded default with the same CIDR, and the IP pool controller diffs its defaults against the raw spec.
caseydavenport
marked this pull request as ready for review
August 18, 2026 12:34
caseydavenport
commented
Aug 18, 2026
Each controller declares the spec paths it defaults, and downstream controllers read the computed spec published on the status.
Keeps the object we write back exactly as the user declared it, so the patch and the status writes don't need to restore the spec afterwards.
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
The operator writes its computed defaults back into the Installation spec, which makes the operator the field manager for anything it defaulted. Helm and Argo then conflict on those fields, and a server-side apply from the chart gets rejected. See #5102.
This changes the defaulting to leave the spec alone:
Also fixes a bug this uncovered: an empty ipPools list marshalled the same as an unset one, so asking for no IP pools got the default pool instead. The documented behavior now holds.
Existing clusters where the operator already owns spec fields need one
helm upgrade --force-conflictsto hand ownership back to the chart.Constants that could be plain CRD schema defaults are left alone here - that's a follow-up.