Skip to content

Commit

Permalink
Merge pull request #6289 from micahhausler/eks-get-token-update
Browse files Browse the repository at this point in the history
[customizations/eks]: Update credential API version
  • Loading branch information
stealthycoin authored Jul 28, 2021
2 parents 7d26efd + 3569d49 commit 1b1fa0e
Show file tree
Hide file tree
Showing 23 changed files with 30 additions and 25 deletions.
5 changes: 5 additions & 0 deletions .changes/next-release/enhancement-eks-98667.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"category": "eks",
"type": "enhancement",
"description": "Updated Kubernetes client authentication API version"
}
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/v1alpha1",
"apiVersion": "client.authentication.k8s.io/v1beta1",
"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/v1alpha1"
API_VERSION = "client.authentication.k8s.io/v1beta1"

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/v1alpha1",
"apiVersion": "client.authentication.k8s.io/v1beta1",
"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/v1alpha1",
"apiVersion": "client.authentication.k8s.io/v1beta1",
"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/v1alpha1
apiVersion: client.authentication.k8s.io/v1beta1
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/v1alpha1
apiVersion: client.authentication.k8s.io/v1beta1
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/v1alpha1
apiVersion: client.authentication.k8s.io/v1beta1
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/v1alpha1
apiVersion: client.authentication.k8s.io/v1beta1
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/v1alpha1
apiVersion: client.authentication.k8s.io/v1beta1
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/v1alpha1
apiVersion: client.authentication.k8s.io/v1beta1
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/v1alpha1
apiVersion: client.authentication.k8s.io/v1beta1
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/v1alpha1
apiVersion: client.authentication.k8s.io/v1beta1
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/v1alpha1
apiVersion: client.authentication.k8s.io/v1beta1
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/v1alpha1
apiVersion: client.authentication.k8s.io/v1beta1
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/v1alpha1
apiVersion: client.authentication.k8s.io/v1beta1
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/v1alpha1
apiVersion: client.authentication.k8s.io/v1beta1
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/v1alpha1
apiVersion: client.authentication.k8s.io/v1beta1
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/v1alpha1
apiVersion: client.authentication.k8s.io/v1beta1
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/v1alpha1
apiVersion: client.authentication.k8s.io/v1beta1
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/v1alpha1
apiVersion: client.authentication.k8s.io/v1beta1
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/v1alpha1
apiVersion: client.authentication.k8s.io/v1beta1
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/v1alpha1
apiVersion: client.authentication.k8s.io/v1beta1
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/v1alpha1
apiVersion: client.authentication.k8s.io/v1beta1
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/v1alpha1
apiVersion: client.authentication.k8s.io/v1beta1
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/v1alpha1
apiVersion: client.authentication.k8s.io/v1beta1
args:
- token
- -i
Expand Down

0 comments on commit 1b1fa0e

Please sign in to comment.