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

Adding multiarch image support #1474

Merged
merged 1 commit into from
Dec 21, 2020

Conversation

bahetiamit
Copy link
Contributor

This PR tries to address #1462 by adding multi architecture support to kaniko image.

Description
It uses github actions & buildx & QEMU to build and publish multi-arch kaniko executor image. This adds the flexibility & makes it easy to add support for other architectures. Few dependencies in image are now built from source as binaries are not readily available.

Github workflow is created to execute on a new version release. Once a new github release is done, this workflow automatically kicks in and publishes the image.

Validations
I was able to publish images to my docker hub repo - https://hub.docker.com/repository/docker/bahetiamit/executor/tags?page=1 as I don't have access to gcr.io. Github workflow in action for this - https://github.com/bahetiamit/kaniko/runs/1330719714?check_suite_focus=true

I have made the changes to workflow for gcr.io by referring to https://medium.com/mistergreen-engineering/uploading-a-docker-image-to-gcr-using-github-actions-92e1cdf14811. Someone needs to test this. Also this workflow needs a repository secret GCR_DEVOPS_SERVICE_ACCOUNT_KEY to be able to push the images to gcr.

Submitter Checklist

These are the criteria that every PR should meet, please check them off as you
review them:

  • Includes unit tests
  • Adds integration tests if needed.

See the contribution guide for more details.

Reviewer Notes

  • The code flow looks good.
  • Unit tests and or integration tests added.

@google-cla
Copy link

google-cla bot commented Oct 30, 2020

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed (or fixed any issues), please reply here with @googlebot I signed it! and we'll verify it.


What to do if you already signed the CLA

Individual signers
Corporate signers

ℹ️ Googlers: Go here for more info.

@google-cla google-cla bot added the cla: no CLA not signed by all commit authors label Oct 30, 2020
@google-cla
Copy link

google-cla bot commented Oct 30, 2020

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed (or fixed any issues), please reply here with @googlebot I signed it! and we'll verify it.


What to do if you already signed the CLA

Individual signers
Corporate signers

ℹ️ Googlers: Go here for more info.

@tejal29
Copy link
Member

tejal29 commented Nov 3, 2020

@bahetiamit can you please sign the cla?

@bahetiamit
Copy link
Contributor Author

@tejal29 I have initiated corporate CLA request and soon will sign this PR.

@bahetiamit
Copy link
Contributor Author

@googlebot I signed it!

@google-cla google-cla bot added cla: yes CLA signed by all commit authors and removed cla: no CLA not signed by all commit authors labels Nov 6, 2020
@tejal29
Copy link
Member

tejal29 commented Nov 10, 2020

Thanks a lot @bahetiamit. Not an github workflow expert. Will give it a try!

@bahetiamit
Copy link
Contributor Author

@tejal29 Did you get a chance to look at this?

@tejal29
Copy link
Member

tejal29 commented Dec 9, 2020

@tejal29 Reminder, get to this on Friday morning

Copy link
Member

@tejal29 tejal29 left a comment

Choose a reason for hiding this comment

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

Thank you so much for this PR and sorry for the delay.

Can you make the same changes to deploy/Dockerfile_debug and deploy/Dockerfile_warmer.

Also, i am more comfortable with gcloud flow.
Can you make the changes to cloudbuild.yaml, cloudbuild_release.yaml ?

https://github.com/GoogleContainerTools/kaniko/pull/1521/files#diff-6547f8c009c546989c6d4d936f8eecddf7815e8a40e1924e9a67fec8b24d7132

@@ -0,0 +1,32 @@
diff --git a/build/build-config-edit.sh b/build/build-config-edit.sh
Copy link
Member

Choose a reason for hiding this comment

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

Was this added by mistake?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This patch is required as https://github.com/Azure/acr-docker-credential-helper is hard coded to build for amd64.

deploy/Dockerfile Show resolved Hide resolved
deploy/Dockerfile Show resolved Hide resolved
@tejal29
Copy link
Member

tejal29 commented Dec 11, 2020

@bahetiamit ping. would you able to pick this up?

Thanks

@bahetiamit
Copy link
Contributor Author

@bahetiamit ping. would you able to pick this up?

Thanks

Sure. I will work on this.

@tejal29 tejal29 merged commit 6cffb67 into GoogleContainerTools:master Dec 21, 2020
@darewreck54
Copy link

@tejal29 This might be a dumb question, but if you are installing docker why even use kaniko at this point? Also if you are running kaniko in a k8, running docker in docker will require root access which will be a security risk no?

@darewreck54 darewreck54 mentioned this pull request Jan 15, 2021
3 tasks
@tejal29
Copy link
Member

tejal29 commented Jan 15, 2021

@darewreck54, we need docker to build an image to run the test.
Maybe its time to dogfood kaniko it self.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes CLA signed by all commit authors kokoro:run
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants