Repository navigation
[Backport release-1.6] fix(cilium)!: take cilium's own addresses from a block kube-ovn does not hand out - #4918
Merged
Conversation
Contributor
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configuration
You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
…not hand out On the kube-ovn variants Cilium allocates no pod addresses, but the agent still takes its router IP and the Gateway API Ingress IP from its allocation CIDR. In ipam.mode kubernetes that is Node.spec.podCIDR, which the documented installs slice from the same range kube-ovn allocates pods from, so kube-ovn sooner or later hands a pod an address Cilium already holds. Cilium now runs ipam.mode cluster-pool on the kube-ovn variants, with a /29 per node from the last /21 of networking.podCIDR, and kube-ovn excludes that /21 through --default-exclude-ips. The block stays inside the pod CIDR on purpose. Envoy reaches Gateway API backends from the node's Ingress IP, and kube-ovn masquerades host-originated traffic only when the source lies in one of its subnets, so a block outside them such as 100.65.0.0/16 breaks Gateway API traffic that crosses nodes. A post-upgrade hook moves existing clusters. It first checks that the block has a /29 for every node and lies inside kube-ovn's default subnet, and stops without changing anything otherwise. It adds the block and every node's current Ingress IP to excludeIps of that subnet, because the agent keeps a former Ingress IP in its ipcache as reserved:ingress. It then waits until kube-ovn stops offering the block and stops if an address in it is still allocated. kube-ovn leaves excluded addresses out of the subnet status, so that check reads its IP objects. Then, one node at a time, it clears the inherited /24 from the CiliumNode, waits for the operator to allocate from the block and restarts the agent. networking.podCIDR now needs a prefix of /20 or shorter on the kube-ovn variants, and the render fails otherwise. A /21 cut into /29s also caps these variants at 256 nodes. Assisted-by: LLM Signed-off-by: Yan Bondarenko <[email protected]> (cherry picked from commit dc362fa) Signed-off-by: Myasnikov Daniil <[email protected]>
…6 has The cherry-pick leaves out main's case for the slim variants, which release-1.6 does not have, so that commit's suite stays green on its own. isp-hosted is the one system variant here without kube-ovn, and the /20 requirement must not reach it, so the case renders it with a pod CIDR the kube-ovn variants refuse. Assisted-by: LLM Signed-off-by: Myasnikov Daniil <[email protected]>
hack/helm-unit-tests.sh picks the packages it tests by probing for a make test target, and the cilium package had none, so make unit-tests and CI would skip the IPAM pool suite this package now carries without saying so. Assisted-by: LLM Signed-off-by: Myasnikov Daniil <[email protected]>
myasnikovdaniil
force-pushed
the
backport-4778-to-release-1.6
branch
from
October 14, 2026 11:32
e810c41 to
c9c21bb
Compare
myasnikovdaniil
added a commit
to cozystack/website
that referenced
this pull request
Oct 16, 2026
…ilium on v1.6 (#759) The same note is in `next/` since #739. v1.6.5 carries the change from cozystack/cozystack#4918, so the v1.6 page needs it too. Variant names are the ones v1.6 has (`isp-full`, `isp-full-generic`), there are no slim variants on this line. The limit does not exist on v1.6.4, so merge this after v1.6.5 is published, same as the generated apps reference PR (#758).
1 of 12 tasks
xrmtech-isk
pushed a commit
to katamarina-ru/cozystack-website
that referenced
this pull request
Oct 26, 2026
…ilium on v1.6 The same note has been in next/ since cozystack#739. v1.6.5 carries the change (cozystack/cozystack#4918), so the v1.6 page needs it too, with the variant names this release has. Signed-off-by: Myasnikov Daniil <[email protected]> Assisted-by: LLM
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.
What this PR does
Backport of #4778 to
release-1.6, fixes #3740 on the 1.6 line.On the kube-ovn variants (
isp-full,isp-full-generic) cilium allocates no pod IPs, but it still takes its router IP and the Gateway API ingress IP fromNode.spec.podCIDR, a /24 out of the same range kube-ovn hands pods from, so sooner or later kube-ovn gives a pod an address cilium already holds. With this change cilium runsipam.mode: cluster-poolwith a /29 per node out of the last /21 ofnetworking.podCIDR, platform passes the same range to kube-ovn as--default-exclude-ips, and a post-upgrade hook in the cilium chart moves existing clusters. Mechanism and hook steps are the same as in #4778, its description has the details.This is breaking for a patch release, please read before merging:
networking.podCIDRhas to be /20 or wider on the kube-ovn variants, otherwise platform refuses to render and the upgrade stops before anything changes. Widening the value later doesn't help, the hook refuses a block outside the subnet the cluster was installed with.ipam.mode: kubernetesback, agents take their /24 again, and the exclusions stay inovn-default.Differences from #4778
cozystack.platform.slimgate is gone and the pool is wired in theisp-fullandisp-full-genericbranches only.isp-hostedrendersnoopand is not touched.system.yamlis release-1.6's (nogateway.http2, nonetworking.encryption, the oldercozystack.platform.packagecall).isp-slimis left out of the cherry-pick, the second commit adds one forisp-hostedwith a /24 pod CIDR, which has to keep rendering without the /20 requirement.packages/system/ciliumhas nomake testtarget here, sohack/helm-unit-tests.shwould skip the new suite without a word. The third commit adds it.test_helperinhack/cilium-ipam-migration.batsis not applied. release-1.6 has nohack/test_helper.bashand runshack/*.batsthroughhack/cozytest.sh, with that line the file doesn't load.Validation
helm unittest: cilium 11/11, platform 113/113 with [Backport release-1.6] fix(cert-manager): enable the Gateway API solver in the host cert-manager #4808 merged.hack/cilium-ipam-migration.batspasses 27/27 throughhack/cozytest.sh.helm upgrade(operator stopped, HelmRelease suspended). A pod pinned to10.244.250.10made the hook add the block and the old ingress IPs toexcludeIpsofovn-default, name that address and stop before moving any node. After deleting the pod the same upgrade moved all three nodes to /29s from10.244.248.0/21, router and ingress IPs inside. The available range of the subnet ends at10.244.247.255, no pod IP is duplicated, and pod to pod across nodes, DNS and a ping to a VM pod IP work. A third run of the same upgrade restarted nothing and left the CIDRs as they were.excludeIpsstayed until I patched it by hand.ovn.kubernetes.io/ip_addressinside the block after the migration, the hook looks at it only while migrating.Downstream repositories
The website note for this change is cozystack/website#739, merged for
docs/next. The v1.6 docs need the same note, not opened yet, so the box stays empty.Release note