Move FelixConfiguration writes onto server-side apply on v3 clusters - #5196
Draft
caseydavenport wants to merge 7 commits into
Draft
Move FelixConfiguration writes onto server-side apply on v3 clusters#5196caseydavenport wants to merge 7 commits into
caseydavenport wants to merge 7 commits into
Conversation
One implementation per API group, so the v3 path can later use server-side apply without changing aggregated apiserver behavior.
Field ownership is tracked by the API server in v3 mode, and by a last-written-value annotation in crd.projectcalico.org/v1 mode.
…on writes Fields are now declared unconditionally with a conflict policy, since a field an owner stops declaring gets deleted.
A field owned through a plain update blocks an apply, so the operator forces ownership across once for the values its own record accounts for.
…nfiguration fields A plain update keeps its claim on a field even after an apply writes the same value, so an upgraded cluster needs the operator to force ownership across before it can ever change the field again. The recorded values only cover spec.bpfEnabled, so match the legacy manager name as well.
…and egress gateway controllers policySyncPathPrefix moves under one field manager computed from all four CRs, and the crd.projectcalico.org/v1 writer learns to delete fields a declaration drops.
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
Moves the FelixConfiguration write path onto server-side apply on v3-native clusters, and migrates every controller that writes FelixConfiguration onto it.
crd.projectcalico.org/v1it stays the existing merge patch, with an annotation recording what the operator last wrote so a user's edit is still detectable. That's the aggregated-apiserver case, where the operator writes v1 and users write v3 and managed fields aren't comparable across the boundary.projectcalico.org/v3writes go through server-side apply. Each write site owns a named set of fields, and per field it either defers to a user's edit, overrides it, or degrades the Installation status.Behavior changes worth a look during review:
Remaining work is out of scope here: generated apply configuration types in place of hand-built payloads.