Correctly handle CiliumGatewayClassConfig as namespaced#43254
Merged
youngnick merged 2 commits intocilium:mainfrom Dec 12, 2025
Merged
Correctly handle CiliumGatewayClassConfig as namespaced#43254youngnick merged 2 commits intocilium:mainfrom
youngnick merged 2 commits intocilium:mainfrom
Conversation
|
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 |
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>
e1af125 to
20050c7
Compare
3 tasks
Contributor
|
thanks Nick 😍 |
Member
|
/test |
Member
|
@youngnick shouldn't this |
joamaki
approved these changes
Dec 11, 2025
Contributor
Author
|
@mhofstetter you're right, it should be. Fixed, thanks. |
1 task
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.
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:nonNamespaceddirective, which tells the typed client generation to treat CGCC as a non-namespaced (that is, cluster-scoped) resource, but there is also: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