-
Notifications
You must be signed in to change notification settings - Fork 784
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 multi arch support in all kyverno components (AMD6 and ARM64) #1542
Conversation
Signed-off-by: Raj Das <mail.rajdas@gmail.com>
Signed-off-by: Raj Das <mail.rajdas@gmail.com>
Signed-off-by: Raj Das <mail.rajdas@gmail.com>
cc: @JimBugwadia / @realshuting / @chipzoller |
Signed-off-by: Raj Das <mail.rajdas@gmail.com>
Signed-off-by: Raj Das <mail.rajdas@gmail.com>
Signed-off-by: Raj Das <mail.rajdas@gmail.com>
build is failed due to this
This is because docker buildx builds in image builder cache and it is not able to find it in docker engine. Either we have to user docker or docker buildx? |
Signed-off-by: Raj Das <mail.rajdas@gmail.com>
Signed-off-by: Raj Das <mail.rajdas@gmail.com>
@realshuting Build and e2e has been passed :) Recent changes
Please let me know, if you have any question for this PR. Thanks |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See comments.
Makefile
Outdated
@@ -36,14 +36,17 @@ initContainer: fmt vet | |||
docker-publish-initContainer: docker-build-initContainer docker-tag-repo-initContainer docker-push-initContainer |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since docker-push-initContainer
does everything build
tag
push
, can we remove docker-publish-initContainer
?
Makefile
Outdated
@@ -62,15 +65,18 @@ kyverno: fmt vet | |||
docker-publish-kyverno: docker-build-kyverno docker-tag-repo-kyverno docker-push-kyverno |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here.
@docker push $(REPO)/$(KYVERNO_CLI_IMAGE):$(IMAGE_TAG) | ||
@docker push $(REPO)/$(KYVERNO_CLI_IMAGE):latest | ||
@docker buildx build --file $(PWD)/$(CLI_PATH)/Dockerfile --progress plane --push --platform linux/arm64,linux/amd64 --tag $(REPO)/$(KYVERNO_CLI_IMAGE):$(IMAGE_TAG) . | ||
@docker buildx build --file $(PWD)/$(CLI_PATH)/Dockerfile --progress plane --push --platform linux/arm64,linux/amd64 --tag $(REPO)/$(KYVERNO_CLI_IMAGE):latest . | ||
|
||
################################## | ||
docker-publish-all: docker-publish-initContainer docker-publish-kyverno docker-publish-cli |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here.
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v1 | ||
id: buildx | ||
with: | ||
install: true | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rajdas98 Can you please merge the main branch to check all builds? Thanks. |
Signed-off-by: Raj Das <mail.rajdas@gmail.com>
Signed-off-by: Raj Das <mail.rajdas@gmail.com>
@realshuting Made the changes
|
|
||
docker-build-kyverno: | ||
@docker buildx build --file $(PWD)/$(KYVERNO_PATH)/Dockerfile --progress plane --platform linux/arm64,linux/amd64 --tag $(REPO)/$(KYVERNO_IMAGE):$(IMAGE_TAG) . --build-arg LD_FLAGS=$(LD_FLAGS) | ||
|
||
docker-build-kyverno-amd64: | ||
@docker build -f $(PWD)/$(KYVERNO_PATH)/Dockerfile -t $(REPO)/$(KYVERNO_IMAGE):$(IMAGE_TAG) . --build-arg LD_FLAGS=$(LD_FLAGS) --build-arg TARGETPLATFORM="linux/amd64" | ||
|
||
docker-build-local-kyverno: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we not remove this local build? Some are using this to test locally.
@rajdas98 Can we keep this? #1542 (comment) |
**Oh I forgot that. Let me add |
Signed-off-by: rajdas98 <mail.rajdas@gmail.com>
@realshuting I reverted the docker-build-local-kyverno step in Makefile. |
…yverno#1542) * Adding multi arch support Signed-off-by: Raj Das <mail.rajdas@gmail.com> * Adding multi arch support Signed-off-by: Raj Das <mail.rajdas@gmail.com> * minor refactors Signed-off-by: Raj Das <mail.rajdas@gmail.com> * adding buildx action in e2e.yaml Signed-off-by: Raj Das <mail.rajdas@gmail.com> * Adding kyvernopre Signed-off-by: Raj Das <mail.rajdas@gmail.com> * Adding kyvernopre Signed-off-by: Raj Das <mail.rajdas@gmail.com> * Adding amd build Signed-off-by: Raj Das <mail.rajdas@gmail.com> * Adding go env Signed-off-by: Raj Das <mail.rajdas@gmail.com> * minor fix Signed-off-by: Raj Das <mail.rajdas@gmail.com> * removing docker tag Signed-off-by: Raj Das <mail.rajdas@gmail.com> * Adding local dockerfile build command Signed-off-by: rajdas98 <mail.rajdas@gmail.com> Signed-off-by: vyankatesh <vyankatesh@neualto.com>
Related issue
Issue:
#1535
Docker hub screenshot
Running on ARM k8s cluster
Running on AMD k8s cluster
For demo purpose use these image
imrajdas/kyverno:latest
imrajdas/kyvernopre:latest
imrajdas/kyverno-cli:latest
What type of PR is this?
Proposed changes
Checklist
works.
Further comments