-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Default to beta API for eks get-token #6940
Default to beta API for eks get-token #6940
Conversation
7ba16e5
to
946b014
Compare
Codecov Report
@@ Coverage Diff @@
## develop #6940 +/- ##
===========================================
- Coverage 92.87% 92.87% -0.01%
===========================================
Files 204 204
Lines 16347 16345 -2
===========================================
- Hits 15182 15180 -2
Misses 1165 1165
Continue to review full report at Codecov.
|
1b745fd
to
45d13d4
Compare
@@ -0,0 +1,5 @@ | |||
{ | |||
"type": "bugfix", | |||
"category": "eks get-token", |
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.
nit; Can we make the category ``eks`` to be consistent with other eks changes? We can mention get-token in the description if needed.
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.
This was based on @kyleknap 's comment #6476 (comment)
I can change it to just "eks"
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'll defer to Kyle then if that's the category he wants.
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 added another as a feature one that is also eks get-token
. I'm fine with that as the category.
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 think eks get-token
make sense especially because it is a custom command. One super nitpick thing that I missed in the last PR that I reviewed was that we should encompass the category with double backticks so it shows up as a code literal in the change log (e.g. "``eks get-token``" instead of just "eks get-token"). We should make sure to do that for both change logs entries we have now.
45d13d4
to
835393f
Compare
* Stop logging a warning on an empty KUBERNETES_EXEC_INFO * Respond with correct deprecated version in warning message Signed-off-by: Micah Hausler <mhausler@amazon.com>
835393f
to
99d0fa1
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.
Thanks! 🚢
Signed-off-by: Micah Hausler mhausler@amazon.com
Issue #, if available:
Resolves #6935
Resolves aws/containers-roadmap#1736
Description of changes:
From Kubernetes 1.11 trough 1.19, client-go (so kubectl, kubelet, etc) accepted client.authentication.k8s.io API version v1alpha1 or v1beta1, but only provided
KUBERNETES_EXEC_INFO
if the v1alpha1 API version was specified in a kubeconfig (fixed in kubernetes/kubernetes#95489). This leaves client binaries (such asaws-iam-authenticator
oraws eks get-token
) having to guess what version of the API to respond with. If they guess wrong (which the AWS CLI currently does by falling back to v1alpha1), the user gets an error (observed in comment on #6476).For 1.11-1.19 clients, if their kubeconfig specifies:
v1alpha
(the old default) - Everything works.v1alpha1
is specified inKUBERNETES_EXEC_INFO
, the CLI will correctly provide the right response, and they'll get a warning to upgrade and runaws eks update-kubeconfig
v1beta1
(the new default) - Everything works. The CLI will now correctly guess that an emptyKUBERNETES_EXEC_INFO
means that client-go handled av1beta1
kubeconfig, but isn't telling the CLI about it.v1
(they would have to manually set this) - They will get a failure before ever executing the AWS CLI.For 1.20-1.23 clients (EKS only supports up to 1.22 today), if their kubeconfig specifies:
v1alpha
(the old default) - Everything works.v1alpha1
is specified inKUBERNETES_EXEC_INFO
, the CLI will correctly provide the right response, and they'll get a warning to upgrade and runaws eks update-kubeconfig
v1beta1
(the new default) - Everything works.v1beta1
is specified inKUBERNETES_EXEC_INFO
, the CLI will correctly provide the right responseFor clients <= 1.21, if their kubeconfig specifies
v1
, they will get a failure before ever executing the AWS CLI.For 1.24+ clients (if someone installs kubectl with homebrew), if their kubeconfig specifies:
v1alpha
(the old default) - They will get a failure before ever executing the AWS CLI. (Observed in aws eks update-kubeconfig invalid apiVersion #6920 and aws eks update-kubeconfig invalid apiVersion while using Github linux runners #6921)v1beta1
(the new default) - Everything works.v1beta1
is specified inKUBERNETES_EXEC_INFO
, the CLI will correctly provide the right responsev1
(they would have to manually set this) - Everything works.v1
is specified inKUBERNETES_EXEC_INFO
, the CLI will correctly provide the right responseOnce EKS no longer supports 1.19 (or previous) clusters, we can add back a warning about the empty
KUBERNETES_EXEC_INFO
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
Test code used to validate the above