Skip to content

Correctly handle CiliumGatewayClassConfig as namespaced#43254

Merged
youngnick merged 2 commits intocilium:mainfrom
youngnick:fix-cgcc-processing
Dec 12, 2025
Merged

Correctly handle CiliumGatewayClassConfig as namespaced#43254
youngnick merged 2 commits intocilium:mainfrom
youngnick:fix-cgcc-processing

Conversation

@youngnick
Copy link
Copy Markdown
Contributor

@youngnick youngnick commented Dec 11, 2025

So, it turns out that in #42172, @oblazek fixed handling of CGCCs to cluster-scoped, rather than namespaced, because there are tags in the API defs that indicate CGCC is not namespaced.

However, those tags only control the typed client, the actual YAML that is generated is namespaced. So, although @oblazek was doing the right thing, as we all saw it, that change actually caused #42956.

Specifically, there is a // +genclient:nonNamespaced directive, which tells the typed client generation to treat CGCC as a non-namespaced (that is, cluster-scoped) resource, but there is also:

// +kubebuilder:resource:categories={cilium},singular="ciliumgatewayclassconfig",path="ciliumgatewayclassconfigs",scope="Namespaced",shortName={cgcc}

So, the actual CRD that gets created is namespaced after all, but the generated client is not namespaced.

This PR reverts #42172 and also fixes the typed client generation so that this shouldn't happen again.

Fixes: #42956

gateway-api: correctly handle CiliumGatewayClassConfig as a namespaced resource.

@youngnick youngnick requested review from a team as code owners December 11, 2025 06:09
@maintainer-s-little-helper
Copy link
Copy Markdown

Commit 798d987 does not match "(?m)^Signed-off-by:".

Please follow instructions provided in https://docs.cilium.io/en/stable/contributing/development/contributing_guide/#developer-s-certificate-of-origin

@maintainer-s-little-helper maintainer-s-little-helper Bot added dont-merge/needs-sign-off The author needs to add signoff to their commits before merge. dont-merge/needs-release-note-label The author needs to describe the release impact of these changes. labels Dec 11, 2025
This reverts commit 433db70.

Signed-off-by: Nick Young <nick@isovalent.com>
This commit fixes incorrect generation tags on CiliumGatewayClassConfig.

Previously, the typed Go client was being generated as though
CGCC was _not_ namespaced, although the generated YAMLs for the
actual CustomResourceDefinition _were_ namespaced.

This cleans things up, and makes CGCC _not_ namespaced, correctly.

Signed-off-by: Nick Young <nick@isovalent.com>
@maintainer-s-little-helper maintainer-s-little-helper Bot removed the dont-merge/needs-sign-off The author needs to add signoff to their commits before merge. label Dec 11, 2025
@youngnick youngnick added the release-note/minor This PR changes functionality that users may find relevant to operating Cilium. label Dec 11, 2025
@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 Dec 11, 2025
@youngnick youngnick added the needs-backport/1.18 This PR / issue needs backporting to the v1.18 branch label Dec 11, 2025
@oblazek
Copy link
Copy Markdown
Contributor

oblazek commented Dec 11, 2025

thanks Nick 😍

Copy link
Copy Markdown
Member

@mhofstetter mhofstetter left a comment

Choose a reason for hiding this comment

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

LGTM - thanks!

@mhofstetter
Copy link
Copy Markdown
Member

/test

@mhofstetter
Copy link
Copy Markdown
Member

@youngnick shouldn't this release-note/bug?

@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 Dec 11, 2025
@youngnick youngnick added release-note/bug This PR fixes an issue in a previous release of Cilium. and removed release-note/minor This PR changes functionality that users may find relevant to operating Cilium. labels Dec 11, 2025
@youngnick
Copy link
Copy Markdown
Contributor Author

@mhofstetter you're right, it should be. Fixed, thanks.

@youngnick youngnick added this pull request to the merge queue Dec 11, 2025
Merged via the queue into cilium:main with commit 8e3e8d3 Dec 12, 2025
75 checks passed
@youngnick youngnick deleted the fix-cgcc-processing branch December 12, 2025 00:01
@kaworu kaworu mentioned this pull request Dec 12, 2025
7 tasks
@kaworu kaworu added the backport-pending/1.18 The backport for Cilium 1.18.x for this PR is in progress. label Dec 12, 2025
@kaworu kaworu removed the needs-backport/1.18 This PR / issue needs backporting to the v1.18 branch label Dec 12, 2025
@github-actions github-actions Bot added backport-done/1.18 The backport for Cilium 1.18.x for this PR is done. and removed backport-pending/1.18 The backport for Cilium 1.18.x for this PR is in progress. labels Dec 17, 2025
@cilium-release-bot cilium-release-bot Bot moved this to Released in cilium v1.19.0 Feb 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport-done/1.18 The backport for Cilium 1.18.x for this PR is done. ready-to-merge This PR has passed all tests and received consensus from code owners to merge. release-note/bug This PR fixes an issue in a previous release of Cilium.

Projects

No open projects
Status: Released

Development

Successfully merging this pull request may close these issues.

GatewayClass InvalidParameters when referencing CiliumGatewayClassConfig

6 participants