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

feat: add multi-arch images amd64 and arm64 #382

Merged
merged 7 commits into from
Mar 7, 2022

Conversation

Gearheads
Copy link
Collaborator

@Gearheads Gearheads commented Jan 27, 2022

What this PR does / why we need it:
This PR add steps for creating images per architecture per Dockerfile, and then grouping those images with docker manifest to create multi-architecture Docker images.

Also, changes the GITHUB_TOKEN for titlechecktitlecheck in an attempt to resolve the issue Error: Resource not accessible by integration.
For reference: aslafy-z/conventional-pr-title-action#119

Edit: I reverted this change, because it did not solve the issue. Instead, there was another error: Error: Bad credentials.

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes #374, fixes #387

…ERIMENTAL flag, add Set up QEMU step, and which to GH_PAT for titlecheck
@Gearheads Gearheads added kind/feature A new feature request area/release-and-packaging Relates to releasing and packaging labels Jan 27, 2022
@Gearheads Gearheads self-assigned this Jan 27, 2022
@Gearheads
Copy link
Collaborator Author

Gearheads commented Feb 1, 2022

Turns out we cannot merge this until these dependencies have been updated:

Also, there is a make instruction for testing the release locally:

make release-local

https://github.com/fidelity/kconnect/blob/main/docs/book/src/release.md

EDIT: Looks like aws-iam-authenticator created a new release that supports ARM64: https://github.com/kubernetes-sigs/aws-iam-authenticator/releases/tag/v0.5.5

…ecific binary, update goreleaser to build arm version specifc, and remove arm32 requirement from deps
@Gearheads Gearheads changed the title feat: add multi-arch images amd64, arm64, arm32v7 feat: add multi-arch images amd64 and arm64 Feb 4, 2022
@Gearheads
Copy link
Collaborator Author

Gearheads commented Mar 4, 2022

Verified kconnect is running as non-root user
$ docker run -it --rm --entrypoint sh kconnectcli/kconnect:0.5.4-alpine-with-deps-arm64
WARNING: The requested image's platform (linux/arm64) does not match the detected host platform (linux/amd64) and no specific platform was requested
/app $ ps aux | grep kconnect
    1 kconnect  0:00 {sh} /usr/bin/qemu-aarch64 /bin/sh
    9 kconnect  0:00 /bin/ps aux
   11 kconnect  0:00 {grep} /usr/bin/qemu-aarch64 /bin/grep kconnect

$ docker run -it --rm --entrypoint sh kconnectcli/kconnect:0.5.4-alpine-amd64
/ $ ps aux | grep kconnect
    1 kconnect  0:00 sh
   13 kconnect  0:00 ps aux
   14 kconnect  0:00 grep kconnect
Verified that the new binaries exist
$ docker run -it --rm --entrypoint sh kconnectcli/kconnect:0.5.4-alpine-with-deps-arm64
WARNING: The requested image's platform (linux/arm64) does not match the detected host platform (linux/amd64) and no specific platform was requested
/app $ ls -al
total 174152
drwxr-xr-x    1 root     root          4096 Mar  4 20:24 .
drwxr-xr-x    1 root     root          4096 Mar  4 20:27 ..
-rwxr-xr-x    1 root     root      45547520 Mar  3 22:49 aws-iam-authenticator
-rwxr-xr-x    1 3434     3434      36634624 Feb  4  2021 helm
-rwxr-xr-x    1 root     root      18546688 Mar  4 20:24 kconnect
-rwxr-xr-x    1 root     root      37158912 Mar  3 22:49 kubectl
-rwxr-xr-x    1 root     root      40434362 Mar  3 22:49 kubelogin
/app $ aws-iam-authenticator version
{"Version":"0.5.5","Commit":"768f976bcadac89cceb31c357a0f55e460c446a2"}
/app $ kubelogin --version
kubelogin version 
git hash: v0.0.11/01c6495400f0374b261d1f9dfe46114534805f7a
Go version: go1.16.14
Build time: 2022-02-11T18:44:58Z
Verified kconnect can connect to a cluster
$ docker run -it --rm --entrypoint sh fcr.fmr.com/casaler/kconnect:0.5.5-rc-alpine-with-deps-amd64
/app $ kconnect use eks
info	kconnect - the Kubernetes Connection Manager CLI	{"version": "0.5.4-next"}
info	authenticating user	{"app": "kconnect", "provider": "saml"}
? Select an AWS region us-east-2
? Select AWS role Account: <AWS-role-Account>
info	requesting AWS credentials using SAML	{"provider": "saml", "sp": "aws"}
info	discovering clusters	{"app": "kconnect", "provider": "eks"}
info	discovering EKS clusters	{"app": "kconnect", "provider": "eks"}
? Do you want to set an alias? No
info	Command to reconnect using this alias: kconnect to 	{"app": "kconnect"}
info	setting current context	{"context": "kconnect"}
info	kubeconfig updated	{"path": "/home/kconnect/.kube/config"}

Copy link
Contributor

@seankelly001 seankelly001 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks @Gearheads

@seankelly001 seankelly001 merged commit c63bfc5 into fidelity:main Mar 7, 2022
@Gearheads Gearheads deleted the feature/374-create-arm-images branch March 7, 2022 17:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/release-and-packaging Relates to releasing and packaging kind/feature A new feature request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

update aws-iam-authenticator APIVersion Create ARM image for kconnect
2 participants