-
Notifications
You must be signed in to change notification settings - Fork 40
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
OCPVE-361: chore: allow multi-arch with ARCH / OS Flag #392
OCPVE-361: chore: allow multi-arch with ARCH / OS Flag #392
Conversation
@jakobmoellerdev: This pull request references OCPVE-361 which is a valid jira issue. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #392 +/- ##
===========================================
+ Coverage 16.59% 56.65% +40.06%
===========================================
Files 24 26 +2
Lines 2061 2245 +184
===========================================
+ Hits 342 1272 +930
+ Misses 1693 883 -810
- Partials 26 90 +64
|
|
||
build-prometheus-alert-rules: jsonnet monitoring/mixin.libsonnet monitoring/alerts/alerts.jsonnet monitoring/alerts/*.libsonnet | ||
$(JSONNET) -S monitoring/alerts/alerts.jsonnet > config/prometheus/prometheus_rules.yaml | ||
|
||
docker-build: ## Build docker image with the manager. | ||
$(IMAGE_BUILD_CMD) build -t ${IMG} . | ||
$(IMAGE_BUILD_CMD) build --platform=${OS}/${ARCH} -t ${IMG} . |
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.
This does not work on darwin/arm64:
➜ ✗ make docker-build
podman build --platform=darwin/arm64 -t quay.io/test/lvms-operator:tag .
[1/2] STEP 1/13: FROM golang:1.20 AS builder
Resolving "golang" using unqualified-search registries (/etc/containers/registries.conf.d/999-podman-machine.conf)
Trying to pull docker.io/library/golang:1.20...
Error: creating build container: choosing an image from manifest list docker://golang:1.20: no image found in manifest list for architecture arm64, variant "", OS darwin
make: *** [docker-build] Error 125
I don't know if we will ever need to build container images for different platforms from here. Can we make this at least parametric, meaning it will build for linux/amd64 by default unless related parameters are specified?
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.
So it was actually parametric already, but used go env
variables for OS / ARCH. I just hardcoded the Args to linux/amd64
now. You should be able to run this normally without any changes now.
2da37b6
to
0eadbd6
Compare
/test images |
/test lvm-operator-e2e-aws |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: jakobmoellerdev, suleymanakbas91 The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
@jakobmoellerdev: all tests passed! Full PR test history. Your PR dashboard. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
Allows building multi-arch images with ARCH / OS Flag from makefile. Also adjusts dockerfile to have the correct flags passed to the builder and running platform image.