Default BPFOverlayHostSourceIP to HostAddress on fresh eBPF installs - #5057
Draft
tomastigera wants to merge 1 commit into
Draft
Default BPFOverlayHostSourceIP to HostAddress on fresh eBPF installs#5057tomastigera wants to merge 1 commit into
tomastigera wants to merge 1 commit into
Conversation
On a brand new eBPF cluster the operator now sets FelixConfiguration's bpfOverlayHostSourceIP to HostAddress, opting the cluster out of assigning an IP to the IPIP/VXLAN overlay tunnel device and sourcing host-networked overlay traffic from the node's own address instead. Felix defaults this setting to TunnelAddress. Existing and upgraded clusters keep that default (the operator only writes the field on a fresh install, detected by the absence of the calico-node DaemonSet) so their established host-networked overlay flows are not disrupted. Fresh clusters have no such flows to preserve, so they adopt the leaner HostAddress mode. The write is guarded on the field being unset, so a user-provided value is never overridden. Requires the FelixConfiguration bpfOverlayHostSourceIP field from projectcalico/calico#11919. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.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
Type: enhancement.
On a fresh eBPF install, the operator now defaults
FelixConfiguration'sbpfOverlayHostSourceIPtoHostAddress, opting the cluster out of assigning an IP to theIPIP/VXLAN overlay tunnel device and sourcing host-networked (node-originated) overlay traffic
from the node's own address instead.
Felix defaults this setting to
TunnelAddress. Existing and upgraded clusters keep thatdefault — the operator only writes the field on a fresh install, detected by the absence of
the
calico-nodeDaemonSet insetDefaultsOnFelixConfiguration. A cluster switched fromiptables to eBPF still has its DaemonSet, so it is treated as existing and its established
host-networked overlay flows are not disrupted. Fresh clusters have no such flows to preserve,
so they adopt the leaner
HostAddressmode. The write is guarded on the field being unset, soa user-provided value is never overridden (users can always set it on the
FelixConfigurationCRD directly).
This is the operator companion to the Felix change
projectcalico/calico#11919, which added the
bpfOverlayHostSourceIPenum (
TunnelAddress|HostAddress). It applies to both Calico OSS and Calico Enterprise.Affected components:
pkg/controller/installation(core controller FelixConfigurationdefaulting).
Important
Draft — blocked on a dependency bump. The code references
v3.BPFOverlayHostSourceIPHostAddress, which is not yet in the publishedgithub.com/tigera/apimodule (the field merged to calico OSS master but must still ride theOSS→EE merge into calico-private, then a
tigera/apisync). Oncetigera/apicarries thefield, the remaining step is
go get github.com/tigera/api@<sha>+make mod-tidy, afterwhich this compiles and CI is green. The bundled OSS
FelixConfigurationCRD already carriesthe enum; the Enterprise bundled CRD will follow the same version sync.
Testing
Unit tests (
pkg/controller/installation), all passing:bpfOverlayHostSourceIP=HostAddresscalico-nodeDaemonSet already present (upgrade) → field left unsetEnd-to-end on a live 2-node kind BPF+VXLAN cluster (operator run against the cluster; Calico
built from calico master
1696258efb, which carries the Felix change, published tothruby/node+thruby/calico):bpfOverlayHostSourceIP: HostAddress; felix parsed andhonored it;
vxlan.calicohad no IPv4 on both nodes (a tunnel address was still allocatedin IPAM but felix did not put it on the device); cross-node overlay pod-to-pod connectivity
worked both directions (0% loss).
vxlan.calicothe tunnel IPs(
192.168.139.64/32,192.168.233.128/32); after flipping the Installation to BPF theoperator wrote nothing (
bpfOverlayHostSourceIPstayed empty), felix used itsTunnelAddressdefault, and the tunnel IPs were preserved unchanged — no disruption.Release Note
For PR author
make gen-filesmake gen-versionsFor PR reviewers
A note for code reviewers - all pull requests must have the following:
kind/enhancementif this is a a new feature.