Skip to content

operator: Move flags from InitGlobalFlags to appropriate cells#45008

Merged
nebril merged 3 commits intomainfrom
pr/HadrienPatte/operator-flags
Apr 1, 2026
Merged

operator: Move flags from InitGlobalFlags to appropriate cells#45008
nebril merged 3 commits intomainfrom
pr/HadrienPatte/operator-flags

Conversation

@HadrienPatte
Copy link
Copy Markdown
Member

Move some operator flags registration from the global InitGlobalFlags to their relevant cells that own them:

  • cluster-pool-ipv4-cidr, cluster-pool-ipv4-mask-size, cluster-pool-ipv6-cidr and cluster-pool-ipv6-mask-size -> clusterpool IPAM allocator cell
  • pod-restart-selector -> unmanaged pods cell
  • cilium-endpoint-gc-interval -> endpoint gc cell

@maintainer-s-little-helper maintainer-s-little-helper bot added the dont-merge/needs-release-note-label The author needs to describe the release impact of these changes. label Mar 26, 2026
@HadrienPatte HadrienPatte added the area/operator Impacts the cilium-operator component label Mar 26, 2026
Move clusterpool operator flags (`cluster-pool-ipv4-cidr`,
`cluster-pool-ipv4-mask-size`, `cluster-pool-ipv6-cidr` and `cluster-pool-ipv6-mask-size`) registration from the global operator config down to the clusterpool IPAM allocator cell. The flags are now defined and registered closer to where they are used, they are no longer exposed to other cells that don't need them. As a result, the cloud provider variants of the operator (aws/azure/alibaba) no longer regognize those flags (see cmdref diff).

Signed-off-by: Hadrien Patte <hadrien.patte@datadoghq.com>
Move `pod-restart-selector` flag definition and registration from global
operator flags down to the unmanaged pods cell where it belongs.

Signed-off-by: Hadrien Patte <hadrien.patte@datadoghq.com>
Move `cilium-endpoint-gc-interval` flag registration and definition to
the `endpointgc` cell where it belongs.

Signed-off-by: Hadrien Patte <hadrien.patte@datadoghq.com>
@HadrienPatte HadrienPatte force-pushed the pr/HadrienPatte/operator-flags branch from 564b02e to 7a3baab Compare March 26, 2026 14:20
@HadrienPatte HadrienPatte added area/misc Impacts miscellaneous areas of the code not otherwise owned by another area. release-note/misc This PR makes changes that have no direct user impact. and removed area/misc Impacts miscellaneous areas of the code not otherwise owned by another area. labels Mar 26, 2026
@maintainer-s-little-helper maintainer-s-little-helper bot removed the dont-merge/needs-release-note-label The author needs to describe the release impact of these changes. label Mar 26, 2026
@HadrienPatte
Copy link
Copy Markdown
Member Author

/test

@HadrienPatte HadrienPatte marked this pull request as ready for review March 26, 2026 15:51
@HadrienPatte HadrienPatte requested review from a team as code owners March 26, 2026 15:51
Copy link
Copy Markdown
Member

@pippolo84 pippolo84 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice cleanup, thanks! 💯

Copy link
Copy Markdown
Member

@tklauser tklauser left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Small nit re. the 2nd commit message: it only mentions moving the pod-restart-selector option but the change also moves the unmanaged-pod-watcher-interval option.

@maintainer-s-little-helper maintainer-s-little-helper bot added the ready-to-merge This PR has passed all tests and received consensus from code owners to merge. label Apr 1, 2026
@nebril nebril added this pull request to the merge queue Apr 1, 2026
Merged via the queue into main with commit a1eac56 Apr 1, 2026
828 of 843 checks passed
@nebril nebril deleted the pr/HadrienPatte/operator-flags branch April 1, 2026 13:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/operator Impacts the cilium-operator component ready-to-merge This PR has passed all tests and received consensus from code owners to merge. release-note/misc This PR makes changes that have no direct user impact.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants