Repository navigation
Hold bpfKubeProxyHealthzPort=0 until every calico-node accepts it - #5314
Closed
tomastigera wants to merge 1 commit into
Closed
tomastigera wants to merge 1 commit into
tomastigera wants to merge 1 commit into
Conversation
The operator defaults FelixConfiguration's bpfKubeProxyHealthzPort to 0 when BPF is on and it does not manage kube-proxy. 0 is only a valid value for Calico >= v3.32.0 and Enterprise >= v3.23.0-2.0; older calico-node rejects it at startup, so upgrading nodes CrashLoopBackOff, and a manifest-to-operator migration deadlocks because the nodes it has to replace cannot start. Gate the write on every calico-node already running the version the operator targets. A fresh install has nothing running and writes immediately; a pending kube-system migration means manifest-install pods are still serving nodes, so it waits; otherwise the status has to report both the target variant and version, which the operator writes together once the stack is available. The DaemonSet lookup that the bpfEnabled defaulting already did moves up so both checks share it. Cherry-pick of projectcalico/calico#13843 (0d65aae5de), which is the same change in the in-tree copy of this controller. CORE-13540
caseydavenport
approved these changes
Sep 14, 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.
Problem
The operator defaults FelixConfiguration's
bpfKubeProxyHealthzPortto 0 when BPF is on and it is not managing kube-proxy (AKS, where the platform owns the kube-proxy DaemonSet).0 is only a valid value for Calico >= v3.32.0 and Enterprise >= v3.23.0-2.0. Older
calico-noderejects it at startup, so nodes being upgraded go into CrashLoopBackOff, and a manifest-to-operator migration deadlocks outright: the nodes it has to replace cannot start.Change
Gate the write on every
calico-nodealready running the version the operator targets:The DaemonSet lookup that the
bpfEnableddefaulting already did moves up so both checks share it, rather than fetching twice.Relationship to the in-tree copy
Cherry-pick of projectcalico/calico#13843 (
0d65aae5de), the same change in the in-tree copy of this controller. It supersedes #5303, which was closed unmerged; this branch is force-updated from that stale head.Three adaptations were needed, since the two copies have drifted:
r.ext.DefaultFelixConfiguration) between the two hunks, and declareserrearlier, so the DaemonSet fetch had to be rewritten by hand rather than patchedVariant: CalicoEnterprisewhere the in-tree one usesCalico, so the positive spec now assertscr.Status.Variant = cr.Spec.Variantinstead of hard-coding the variantTests
Three specs, all driving real reconciles:
Mutation-tested: replacing the gate with
if true &&fails the first two.Suite: 313 passed / 22 failed. The 22 are all
cel_validation_test.go[BeforeEach]envtest setup failures; a control run on unmodifiedorigin/masterin the same worktree fails the identical 22 (303 passed / 22 failed), so they are pre-existing and environmental.CORE-13540
AI assistance
This PR was written in part with the assistance of generative AI.
Release Note