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

Added arch detection to kubectl download #117

Merged
merged 1 commit into from
Mar 15, 2021
Merged

Added arch detection to kubectl download #117

merged 1 commit into from
Mar 15, 2021

Conversation

gtrubach
Copy link
Contributor

@gtrubach gtrubach commented Feb 28, 2021

This PR adds the arch detection to kubectl download using os.arch() call. It won't work on all arch's, but should support amd64, arm and arm64 on Linux (and some more - https://kubernetes.io/docs/setup/release/notes/#client-binaries). If the action is run on non-supported arch by kubectl it won't be able to download and will fail.

Should fix #115.

@ghost
Copy link

ghost commented Feb 28, 2021

CLA assistant check
All CLA requirements met.

@gtrubach
Copy link
Contributor Author

Integration tests seems to be failing because of ${{ secrets.L2_REPO_TOKEN }} missing.

@gtrubach
Copy link
Contributor Author

To test it I created another branch in my fork kubectl-multiarch-test where I checked-in node_modules. Then I created a repo to test this here https://github.com/gtrubach/k8s-deploy-test which points to the action in that branch and tries to deploy to my local cluster.

The result is here - https://github.com/gtrubach/k8s-deploy-test/runs/1999747697. It uses two self-hosted runners: Windows X64 and Raspberry Pi 2 ARM. Both successful.

Please let me know if anything is needed to be fixed.

@gtrubach gtrubach marked this pull request as ready for review February 28, 2021 21:38
@thesattiraju
Copy link
Contributor

Paging @gtrubach to address the comments, so we can take this forward 😄

@thesattiraju
Copy link
Contributor

@gtrubach one last thing left, before I merge. You have to update/add the unit test. You can find the failing test here: https://github.com/Azure/k8s-deploy/pull/117/checks?check_run_id=2088920179

@gtrubach
Copy link
Contributor Author

@DS-MS - Sorry, my bad. I saw the tests failed but was confused with the red error message about token.

I extended that test to run with several test cases and added another test to test that we handle 404 cases.

Base automatically changed from master to main March 15, 2021 06:56
@thesattiraju thesattiraju merged commit 282a81e into Azure:main Mar 15, 2021
@gtrubach gtrubach deleted the kubectl-multiarch branch March 16, 2021 04:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ARM and other arch's support
2 participants