-
Notifications
You must be signed in to change notification settings - Fork 116
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
Kubeclient 4.2.2 #418
Kubeclient 4.2.2 #418
Conversation
As @KnVerey pointed out, it looks like ActiveFailover makes a reference to the to-be-removed I'm tempted to change the reference to just use the base KubeClient class ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
still need a shim for GCP, but less involved
Why do we still need one? kubeclient's readme makes me think we could replace auth_options: kube_context.auth_options
in our KubeClient construction with auth_options: { bearer_token: Kubeclient::GoogleApplicationDefaultCredentials.token }
. Does that not work?
I'm tempted to change the reference to just use the base KubeClient class (
Kubeclient::Config
) since it's passing the tests, but I think that will cause issues when it actually has to auth against GCP in production.
I bet you're right not to assume it has test coverage for this. We'll probably want to work with that team to test the changes locally before merging them. They have a "check kubectl works" script on that repo that should do the trick (and actually uses the same code as failovers--the repo has a neat modular task architecture).
Another note: we should definitely test this branch manually using both user credentials and application default credentials before merging. My test app has a Shipit task that can be used for the latter. |
This would work up until the point we're not targeting a GCP cluster, which due to the open-source nature of this gem is not a valid assumption to make. I'm wondering if it's worth patching kubeclient upstream. Our simple fix (checking for `auth-provider == "gcp") seems sufficient. |
Running with user credentials locally is working fine. Is the Cumulus Cat Task the Shipit task you're talking about? |
Created upstream kubeclient issue for automatically loading default application credentials. |
aa4a47c
to
341369e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't need to review again, but please fix the Policial errors and 🎩 with the test app before merging.
…urce/custom_resource_definition_test.rb
What are you trying to accomplish with this PR?
Closes #406
Update Kubeclient to 4.2.2. This will let AWS users properly auth via their kubeconfig
How is this accomplished?
Response to changelog
KubeException
is deprecated (it already was, before). Replaced withKubeclient::HttpError
, which is just a subclass ofKubeException
.What could go wrong?
New, strange, behaviour not covered by our tests