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

install-aws-iam-authenticator command fails on newest aws-iam-authenticator release #62

Closed
versus opened this issue Apr 8, 2022 · 10 comments · Fixed by #80
Closed

install-aws-iam-authenticator command fails on newest aws-iam-authenticator release #62

versus opened this issue Apr 8, 2022 · 10 comments · Fixed by #80
Assignees
Labels
bug Something isn't working

Comments

@versus
Copy link

versus commented Apr 8, 2022

Orb version

2.1.1

What happened

The install-aws-iam-authenticator command is failing our builds because the aws-iam-authenticator project pushed a release that does not contain binary assets.

'''
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
curl: (22) The requested URL returned error: 404

Exited with code exit status 22
CircleCI received exit code 22
'''

Expected behavior

Revert to a known good build. It would be ideal if the release version of the aws-iam-authenticator could be check 404 error when we download aws-iam-authenticator and downgrade version

@versus versus added the bug Something isn't working label Apr 8, 2022
@milosivanovic
Copy link

milosivanovic commented Apr 8, 2022

Supposedly the following should fix it (by locking to the previous release), but it doesn't appear to work for me, and still tries to download the latest:

- aws-eks/update-kubeconfig-with-authenticator:
    authenticator-release-tag: v0.5.6

@emrebozkurtemonvia
Copy link

emrebozkurtemonvia commented Apr 8, 2022

Supposedly the following should fix it (by locking to the previous release), but it doesn't appear to work for me, and still tries to download the latest:

- aws-eks/update-kubeconfig-with-authenticator:
    authenticator-release-tag: v0.5.6

try this maybe: authenticator-release-tag: "v0.5.6" it worked for us like that

@versus
Copy link
Author

versus commented Apr 9, 2022

I added check for latest version of authenticator with binary release
#63

@russellraed
Copy link

Supposedly the following should fix it (by locking to the previous release), but it doesn't appear to work for me, and still tries to download the latest:

- aws-eks/update-kubeconfig-with-authenticator:
    authenticator-release-tag: v0.5.6

try this maybe: authenticator-release-tag: "v0.5.6" it worked for us like that

Unfortunately this does not work for us.

@jacobleesinger
Copy link

I'm getting /bin/bash: line 13: v0.5.6: invalid variable name when using authenticator-release-tag: v0.5.6, both with and without the quotes. (using orb version 2.1.1)

@russellraed
Copy link

russellraed commented Apr 9, 2022

Work-around for the meantime, i've added this. Which installs aws-iam-authenticator and kubectl manually:

      - run:
          command: |
            curl -o aws-iam-authenticator https://s3.us-west-2.amazonaws.com/amazon-eks/1.21.2/2021-07-05/bin/linux/amd64/aws-iam-authenticator
            chmod +x ./aws-iam-authenticator
            mkdir -p $HOME/bin && cp ./aws-iam-authenticator $HOME/bin/aws-iam-authenticator && export PATH=$PATH:$HOME/bin
            echo 'export PATH=$PATH:$HOME/bin' >> ~/.bashrc
            aws-iam-authenticator help
            curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl"
            sudo install -o root -g root -m 0755 kubectl /usr/local/bin/kubectl
            kubectl version --client

Add this before aws-eks/update-kubeconfig-with-authenticator step

@dersnek
Copy link

dersnek commented Apr 11, 2022

authenticator-release-tag: v0.5.6 works if you you downgrade your orb version to 1.2.0, aws-eks: circleci/aws-eks@1.2.0

@jazzywhit
Copy link

I have another work around, although I still think that the original bash script should be fixed...

Add an environment varible to your Circle CI project called AWS_AUTHENTICATOR_VARIABLE (or whatever you want) that resolves to the target version. In my case I needed to use 0.6.11 because 0.6.12 is missing binaries.

In your Workflow jobs set authenticator-release-tag: "AWS_AUTHENTICATOR_VARIABLE" like so:

      - aws-eks/update-container-image:
          name: name
          authenticator-release-tag: "AWS_AUTHENTICATOR_VARIABLE"

Then in your jobs where you are defining your Docker image do something like this:

  run_command:
    docker:
      - image: "cimg/python:3.11.4"
        environment:
          AWS_AUTHENTICATOR_VARIABLE: $AWS_AUTHENTICATOR_VARIABLE

This will ensure that you can set the variable on the project, and then you can properly get around the indirect reference in the bash script.

@stoiev
Copy link

stoiev commented Nov 30, 2023

Maybe orb could freeze this binary in lastest version in every release? In CIs, it seems preferable to choose stability over other trade offs.

@jazzywhit
Copy link

Just found out that aws-eks: circleci/aws-eks@2.2.0 will work now, as they removed the indirect reference in the bash script. So now if you use that version you just need to set the tag version without jumping through hoops!

      - aws-eks/update-container-image:
          name: name
          authenticator-release-tag: "0.6.11"

@brivu brivu self-assigned this Jan 8, 2024
@brivu brivu linked a pull request Jan 12, 2024 that will close this issue
@brivu brivu closed this as completed in #80 Jan 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

9 participants