Skip to content

[PMREQ-810] Let kube-controllers watch Networks - #5148

Merged
caseydavenport merged 1 commit into
tigera:masterfrom
fasaxc:kc-watch-networks
Aug 7, 2026
Merged

[PMREQ-810] Let kube-controllers watch Networks#5148
caseydavenport merged 1 commit into
tigera:masterfrom
fasaxc:kc-watch-networks

Conversation

@fasaxc

@fasaxc fasaxc commented Aug 7, 2026

Copy link
Copy Markdown
Member

Description

kube-controllers' ipam_ippool_reserved metric reports how many addresses in each IP pool cannot be assigned. It already covers IPReservations; a companion calico-private PR extends it to an L2 bridge Network's subnet edges (the network and directed-broadcast address) and gateways, which are unassignable for the same reason. The node controller therefore watches Network on its syncer, alongside IPReservation.

That needs list and watch on networks in the kube-controllers ClusterRole. Network is Enterprise / Cloud only, so the rule goes in kubeControllersRoleEnterpriseCommonRules, following the precedent in pkg/render/node.go.

This needs to merge before the calico PR. Without the verb kube-controllers gets a 403 listing networks, and watcherCache only treats a missing CRD (404) as in-sync — a denied list takes the generic retry path without finishing the resync. The DataFeed then never reaches InSync, and every controller on it stalls, including auto host endpoints and the IPAM garbage collector. Calico CI demonstrated it as a [Feature:AutoHEPs] e2e failure.

Testing: the existing kube-controllers render tests, whose ClusterRole rule counts move by one.

Calico side: https://github.com/tigera/calico-private/pull/13102

CORE-13146

Release Note

None

🤖 Generated with Claude Code

The node controller's ipam_ippool_reserved metric now discounts an L2
Network's subnet edges and gateways as well as IPReservations, so it
watches Network on its syncer.  Without the verb the List still succeeds
and the syncer reaches in-sync, so the symptom is a hot re-list rather
than a stalled controller.

Network is Enterprise / Cloud only, so the rule goes in the Enterprise
common rules.

CORE-13146

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@fasaxc
fasaxc requested a review from a team as a code owner August 7, 2026 11:08
@marvin-tigera marvin-tigera added this to the v1.44.0 milestone Aug 7, 2026
@fasaxc fasaxc changed the title Let kube-controllers watch Networks [PMREQ-810] Let kube-controllers watch Networks Aug 7, 2026
@caseydavenport
caseydavenport merged commit 1f3d8a7 into tigera:master Aug 7, 2026
14 checks passed
fasaxc added a commit to fasaxc/operator that referenced this pull request Aug 13, 2026
The node controller's ipam_ippool_reserved metric now discounts an L2
Network's subnet edges and gateways as well as IPReservations, so it
watches Network on its syncer.  Without the verb the List still succeeds
and the syncer reaches in-sync, so the symptom is a hot re-list rather
than a stalled controller.

Network is Enterprise / Cloud only, so the rule goes in the Enterprise
common rules.

CORE-13146

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
(cherry picked from commit 1f3d8a7)
fasaxc added a commit that referenced this pull request Aug 13, 2026
The node controller's ipam_ippool_reserved metric now discounts an L2
Network's subnet edges and gateways as well as IPReservations, so it
watches Network on its syncer.  Without the verb the List still succeeds
and the syncer reaches in-sync, so the symptom is a hot re-list rather
than a stalled controller.

Network is Enterprise / Cloud only, so the rule goes in the Enterprise
common rules.

CORE-13146


(cherry picked from commit 1f3d8a7)

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants