-
Notifications
You must be signed in to change notification settings - Fork 593
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix/kong cluster plugin #1418
Fix/kong cluster plugin #1418
Conversation
Doesn't look like this cleared the clientset generation issue I ran into previously. https://github.com/Kong/kubernetes-ingress-controller/blob/d3dbeee0d7e31a6378884730cc34a817c58dee76/railgun/pkg/clientset/typed/configuration/v1/kongclusterplugin.go#L58-L77 still has namespace information. Suppose this is as good enough venue to discuss as any other, since the root of the needed change (the scope annotation in |
Kubebuilder isn't responsible for the clientset, we generate this separately from Kubebuilder using |
@shaneutt I used this https://github.com/kubernetes/code-generator/tree/master/cmd/client-gen to re-generate the client-sets but no effect |
Project names are meaningless to me, it's all kubebuilder :D noted though, I'll try to remember which is which in the future. After some more searching, that does indicate why my original attempt didn't work: kubebuilder and client-gen both have their own (different) metadata tags, and there's an additional tag needed for client-gen to do its half of the non-namespaced change:
@tharun208 if you add that tag and then run |
https://stupefied-goodall-e282f7.netlify.app/contributors/devel/generating-clientset/ This document says we need to tag a separate tag for cluster scoped crd generation. |
and also the makefile is not having a command to install the |
Codecov Report
@@ Coverage Diff @@
## next #1418 +/- ##
==========================================
+ Coverage 52.90% 55.28% +2.38%
==========================================
Files 35 42 +7
Lines 3272 3661 +389
==========================================
+ Hits 1731 2024 +293
- Misses 1408 1489 +81
- Partials 133 148 +15
Continue to review full report at Codecov.
|
There are two outstanding issues. One is that I forgot the ingress class annotation on my original test object. That's easy to fix:
The second part is weirder. For some reason the store isn't being constructed correctly:
Looks like wherever we insert this into the store is still treating this like a namespaced object (a KongPlugin would have a key like |
Alright, looks like the second part is simple if more annoying to track down:
This was new for 2.x only. Not entirely sure how 1.x store worked. Apparently it just uses the stuff in fake_store.go (which had the correct key function)? Not worth investigating too much. @tharun208 with cluster.diff.txt on top of the previous commits here tests will pass. You'll want to pull the latest upstream copy of next and rebase to that also. Edit: well, maybe not. Something weird happening where they said they passed but then claimed the condition never satisfied after? Maybe just a flake, since the existing KongPlugin test had issues in my run as well. Edit 2: subsequent run looks fine, so apparently indeed a flake. |
Signed-off-by: Tharun <rajendrantharun@live.com>
What this PR does / why we need it:
Which issue this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close that issue when PR gets merged): fixes #1361Special notes for your reviewer:
PR Readiness Checklist:
Complete these before marking the PR as
ready to review
:CHANGELOG.md
release notes have been updated to reflect any significant (and particularly user-facing) changes introduced by this PR