Skip to content

Commit

Permalink
merge(#3635): fixed EKS authn apiVersion
Browse files Browse the repository at this point in the history
Fixed EKS new aws-iam-authn apiVersion
  • Loading branch information
pregnor authored Sep 1, 2022
2 parents 96da08b + a678f97 commit fcb18d1
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ FROM alpine:3.13 AS iamauth

WORKDIR /tmp

ENV IAM_AUTH_VERSION 0.4.0
ENV IAM_AUTH_VERSION 0.5.9
ENV IAM_AUTH_URL "https://github.com/kubernetes-sigs/aws-iam-authenticator/releases/download/v${IAM_AUTH_VERSION}"
RUN set -xe \
&& wget ${IAM_AUTH_URL}/aws-iam-authenticator_${IAM_AUTH_VERSION}_linux_amd64 \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ func generateK8sConfig(clusterName string, apiEndpoint string, certificateAuthor
Name: "eks",
AuthInfo: clientcmdapi.AuthInfo{
Exec: &clientcmdapi.ExecConfig{
APIVersion: "client.authentication.k8s.io/v1alpha1",
APIVersion: "client.authentication.k8s.io/v1beta1",
Command: "aws-iam-authenticator",
Args: []string{"token", "-i", clusterName},
Env: []clientcmdapi.ExecEnvVar{
Expand Down
2 changes: 1 addition & 1 deletion src/cluster/eks.go
Original file line number Diff line number Diff line change
Expand Up @@ -728,7 +728,7 @@ func (c *EKSCluster) GetK8sUserConfig() ([]byte, error) {
k8sutil.CreateAuthInfoFunc(func(clusterName string) *clientcmdapi.AuthInfo {
return &clientcmdapi.AuthInfo{
Exec: &clientcmdapi.ExecConfig{
APIVersion: "client.authentication.k8s.io/v1alpha1",
APIVersion: parsedAdminConfig.AuthInfos["eks"].Exec.APIVersion,
Command: "aws-iam-authenticator",
Args: []string{"token", "-i", clusterName},
},
Expand Down

0 comments on commit fcb18d1

Please sign in to comment.