Skip to content
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

Revert "[customizations/eks]: Update credential API version" #6309

Merged
merged 2 commits into from
Jul 30, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changes/next-release/bugfix-EKS-22364.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"type": "bugfix",
"category": "``eks``",
"description": "Fixes `#6308 <https://github.com/aws/aws-cli/issues/6308>`__ version mismatch running eks get-login without eks update-config"
}
2 changes: 1 addition & 1 deletion awscli/customizations/eks/get_token.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ def _run_main(self, parsed_args, parsed_globals):

full_object = {
"kind": "ExecCredential",
"apiVersion": "client.authentication.k8s.io/v1beta1",
"apiVersion": "client.authentication.k8s.io/v1alpha1",
"spec": {},
"status": {
"expirationTimestamp": token_expiration,
Expand Down
2 changes: 1 addition & 1 deletion awscli/customizations/eks/update_kubeconfig.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
# Use the endpoint for kubernetes 1.10
# To get the most recent endpoint we will need to
# Do a check on the cluster's version number
API_VERSION = "client.authentication.k8s.io/v1beta1"
API_VERSION = "client.authentication.k8s.io/v1alpha1"

class UpdateKubeconfigCommand(BasicCommand):
NAME = 'update-kubeconfig'
Expand Down
2 changes: 1 addition & 1 deletion awscli/examples/eks/get-token.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Output::

{
"kind": "ExecCredential",
"apiVersion": "client.authentication.k8s.io/v1beta1",
"apiVersion": "client.authentication.k8s.io/v1alpha1",
"spec": {},
"status": {
"expirationTimestamp": "2019-08-14T18:44:27Z",
Expand Down
2 changes: 1 addition & 1 deletion tests/functional/eks/test_get_token.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ def test_get_token(self, mock_datetime):
response,
{
"kind": "ExecCredential",
"apiVersion": "client.authentication.k8s.io/v1beta1",
"apiVersion": "client.authentication.k8s.io/v1alpha1",
"spec": {},
"status": {
"expirationTimestamp": "2019-10-23T23:14:00Z",
Expand Down
2 changes: 1 addition & 1 deletion tests/functional/eks/testdata/invalid_string_cluster_entry
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ users:
- name: arn:aws:eks:us-west-2:111222333444:cluster/Existing
user:
exec:
apiVersion: client.authentication.k8s.io/v1beta1
apiVersion: client.authentication.k8s.io/v1alpha1
args:
- --region
- us-west-2
Expand Down
2 changes: 1 addition & 1 deletion tests/functional/eks/testdata/invalid_string_clusters
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ users:
- name: arn:aws:eks:us-west-2:111222333444:cluster/Existing
user:
exec:
apiVersion: client.authentication.k8s.io/v1beta1
apiVersion: client.authentication.k8s.io/v1alpha1
args:
- --region
- us-west-2
Expand Down
2 changes: 1 addition & 1 deletion tests/functional/eks/testdata/invalid_string_context_entry
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ users:
- name: arn:aws:eks:us-west-2:111222333444:cluster/Existing
user:
exec:
apiVersion: client.authentication.k8s.io/v1beta1
apiVersion: client.authentication.k8s.io/v1alpha1
args:
- --region
- us-west-2
Expand Down
2 changes: 1 addition & 1 deletion tests/functional/eks/testdata/invalid_string_contexts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ users:
- name: arn:aws:eks:us-west-2:111222333444:cluster/Existing
user:
exec:
apiVersion: client.authentication.k8s.io/v1beta1
apiVersion: client.authentication.k8s.io/v1alpha1
args:
- --region
- us-west-2
Expand Down
4 changes: 2 additions & 2 deletions tests/functional/eks/testdata/output_combined
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ users:
- name: arn:aws:eks:us-west-2:111222333444:cluster/Existing
user:
exec:
apiVersion: client.authentication.k8s.io/v1beta1
apiVersion: client.authentication.k8s.io/v1alpha1
args:
- --region
- us-west-2
Expand All @@ -36,7 +36,7 @@ users:
- name: arn:aws:eks:region:111222333444:cluster/ExampleCluster
user:
exec:
apiVersion: client.authentication.k8s.io/v1beta1
apiVersion: client.authentication.k8s.io/v1alpha1
args:
- --region
- region
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ users:
- name: arn:aws:eks:us-west-2:111222333444:cluster/Existing
user:
exec:
apiVersion: client.authentication.k8s.io/v1beta1
apiVersion: client.authentication.k8s.io/v1alpha1
args:
- --region
- us-west-2
Expand All @@ -14,7 +14,7 @@ users:
- name: arn:aws:eks:region:111222333444:cluster/ExampleCluster
user:
exec:
apiVersion: client.authentication.k8s.io/v1beta1
apiVersion: client.authentication.k8s.io/v1alpha1
args:
- --region
- region
Expand Down
2 changes: 1 addition & 1 deletion tests/functional/eks/testdata/output_single
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ users:
- name: arn:aws:eks:region:111222333444:cluster/ExampleCluster
user:
exec:
apiVersion: client.authentication.k8s.io/v1beta1
apiVersion: client.authentication.k8s.io/v1alpha1
args:
- --region
- region
Expand Down
2 changes: 1 addition & 1 deletion tests/functional/eks/testdata/valid_bad_cluster
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ users:
- name: arn:aws:eks:us-west-2:111222333444:cluster/Existing
user:
exec:
apiVersion: client.authentication.k8s.io/v1beta1
apiVersion: client.authentication.k8s.io/v1alpha1
args:
- --region
- us-west-2
Expand Down
2 changes: 1 addition & 1 deletion tests/functional/eks/testdata/valid_bad_cluster2
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ users:
- name: arn:aws:eks:us-west-2:111222333444:cluster/Existing
user:
exec:
apiVersion: client.authentication.k8s.io/v1beta1
apiVersion: client.authentication.k8s.io/v1alpha1
args:
- --region
- us-west-2
Expand Down
2 changes: 1 addition & 1 deletion tests/functional/eks/testdata/valid_bad_context
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ users:
- name: arn:aws:eks:us-west-2:111222333444:cluster/Existing
user:
exec:
apiVersion: client.authentication.k8s.io/v1beta1
apiVersion: client.authentication.k8s.io/v1alpha1
args:
- --region
- us-west-2
Expand Down
2 changes: 1 addition & 1 deletion tests/functional/eks/testdata/valid_bad_context2
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ users:
- name: arn:aws:eks:us-west-2:111222333444:cluster/Existing
user:
exec:
apiVersion: client.authentication.k8s.io/v1beta1
apiVersion: client.authentication.k8s.io/v1alpha1
args:
- --region
- us-west-2
Expand Down
2 changes: 1 addition & 1 deletion tests/functional/eks/testdata/valid_bad_user
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ preferences: {}
users:
- user:
exec:
apiVersion: client.authentication.k8s.io/v1beta1
apiVersion: client.authentication.k8s.io/v1alpha1
args:
- --region
- us-west-2
Expand Down
2 changes: 1 addition & 1 deletion tests/functional/eks/testdata/valid_changed_ordering
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ users:
- name: arn:aws:eks:us-west-2:111222333444:cluster/Existing
user:
exec:
apiVersion: client.authentication.k8s.io/v1beta1
apiVersion: client.authentication.k8s.io/v1alpha1
args:
- --region
- us-west-2
Expand Down
2 changes: 1 addition & 1 deletion tests/functional/eks/testdata/valid_existing
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ users:
- name: arn:aws:eks:us-west-2:111222333444:cluster/Existing
user:
exec:
apiVersion: client.authentication.k8s.io/v1beta1
apiVersion: client.authentication.k8s.io/v1alpha1
args:
- --region
- us-west-2
Expand Down
2 changes: 1 addition & 1 deletion tests/functional/eks/testdata/valid_no_cluster
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ users:
- name: arn:aws:eks:us-west-2:111222333444:cluster/Existing
user:
exec:
apiVersion: client.authentication.k8s.io/v1beta1
apiVersion: client.authentication.k8s.io/v1alpha1
args:
- --region
- us-west-2
Expand Down
2 changes: 1 addition & 1 deletion tests/functional/eks/testdata/valid_no_context
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ users:
- name: arn:aws:eks:us-west-2:111222333444:cluster/Existing
user:
exec:
apiVersion: client.authentication.k8s.io/v1beta1
apiVersion: client.authentication.k8s.io/v1alpha1
args:
- --region
- us-west-2
Expand Down
2 changes: 1 addition & 1 deletion tests/functional/eks/testdata/valid_no_current_context
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ users:
- name: arn:aws:eks:us-west-2:111222333444:cluster/Existing
user:
exec:
apiVersion: client.authentication.k8s.io/v1beta1
apiVersion: client.authentication.k8s.io/v1alpha1
args:
- --region
- us-west-2
Expand Down
4 changes: 2 additions & 2 deletions tests/functional/eks/testdata/valid_old_data
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ users:
- name: arn:aws:eks:us-west-2:111222333444:cluster/Existing
user:
exec:
apiVersion: client.authentication.k8s.io/v1beta1
apiVersion: client.authentication.k8s.io/v1alpha1
args:
- --region
- us-west-2
Expand All @@ -36,7 +36,7 @@ users:
- name: arn:aws:eks:region:111222333444:cluster/ExampleCluster
user:
exec:
apiVersion: client.authentication.k8s.io/v1beta1
apiVersion: client.authentication.k8s.io/v1alpha1
args:
- token
- -i
Expand Down