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

Fix Makefile's use of ARCH to rename x86_64 to amd64, fix kind-deploy/undeploy target #157

Merged
merged 2 commits into from
Aug 8, 2024

Conversation

squizzi
Copy link
Contributor

@squizzi squizzi commented Aug 7, 2024

'make clusterawsadm' uses the ARCH var to craft a URL for downloading the clusterawsadm binary but 'uname -m' outputs the arch as 'x86_64' while the binary versions for download use 'amd64', this modifies the arch outputted by 'uname -m' to use 'amd64' so that the curl does not fail with 'Not Found'.

Testing

Before make clusterawsadm curled a URL that does not exist and outputted a bin file with Not Found:

$ make clusterawsadm
$ curl -sL https://github.com/kubernetes-sigs/cluster-api-provider-aws/releases/download/v2.5.2/clusterawsadm_v2.5.2_linux_x86_64 -o /home/squizzi/go/src/github.com/Mirantis/hmc/bin/clusterawsadm
chmod +x /home/squizzi/go/src/github.com/Mirantis/hmc/bin/clusterawsadm

$ curl -sL https://github.com/kubernetes-sigs/cluster-api-provider-aws/releases/download/v2.5.2/clusterawsadm_v2.5.2_linux_x86_64    
Not Found%                                                        

Now, the make works as intended on x86_64 arch systems:

$ make clusterawsadm 
curl -sL https://github.com/kubernetes-sigs/cluster-api-provider-aws/releases/download/v2.5.2/clusterawsadm_v2.5.2_linux_amd64 -o /home/squizzi/go/src/github.com/Mirantis/hmc/bin/clusterawsadm
chmod +x /home/squizzi/go/src/github.com/Mirantis/hmc/bin/clusterawsadm

...

$ ./bin/clusterawsadm version  
clusterawsadm version: &version.Info{Major:"2", Minor:"5", GitVersion:"2.5.2", GitCommit:"5383d351296ff753f30c861c45275ab83069d395", GitTreeState:"clean", BuildDate:"2024-06-17T16:24:51Z", GoVersion:"go1.21.11", AwsSdkVersion:"v1.51.17", Compiler:"gc", Platform:"linux/amd64"}

'make clusterawsadm' uses the ARCH var to craft a URL for downloading
the clusterawsadm binary but 'uname -m' outputs the arch as 'x86_64'
while the binary versions for download use 'amd64', this modifies the
arch outputted by 'uname -m' to use 'amd64' so that the curl does not
fail with 'Not Found'.

Signed-off-by: Kyle Squizzato <[email protected]>
@DinaBelova DinaBelova added the bug Something isn't working label Aug 7, 2024
Signed-off-by: Kyle Squizzato <[email protected]>
@squizzi squizzi changed the title Fix Makefile's use of ARCH to rename x86_64 to amd64 Fix Makefile's use of ARCH to rename x86_64 to amd64, fix kind-deploy/undeploy target Aug 7, 2024
@squizzi
Copy link
Contributor Author

squizzi commented Aug 7, 2024

Added another Makefile fix which fixes kind-deploy/kind-undeploy, they were referencing kind but not using the version that gets installed into ./bin

@Kshatrix Kshatrix merged commit f95f89a into k0rdent:main Aug 8, 2024
1 check passed
@squizzi squizzi deleted the patch_fix-arch-amd64 branch August 16, 2024 03:52
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
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants