fix: make deploy-olm on ARM clusters#1478
Conversation
Signed-off-by: Mateus Oliveira <msouzaol@redhat.com>
This comment was marked as outdated.
This comment was marked as outdated.
|
Skipping CI for Draft Pull Request. |
Signed-off-by: Mateus Oliveira <msouzaol@redhat.com>
weshayutin
left a comment
There was a problem hiding this comment.
whayutin@thinkdoe:/OPENSHIFT/git/OADP/oadp-operator$ oc get node -o jsonpath='{.items[0].status.nodeInfo.operatingSystem}'/OPENSHIFT/git/OADP/oadp-operatorget node -o jsonpath='{.items[0].status.nodeInfo.architecture}'ure}'
linuxwhayutin@thinkdoe:
amd64whayutin@thinkdoe:~/OPENSHIFT/git/OADP/oadp-operator$
| ifeq ($(shell $(ENVTEST) list | grep $(ENVTEST_K8S_VERSION)),) | ||
| # TODO what --arch=amd64 does here? | ||
| ENVTESTPATH = $(shell $(ENVTEST) --arch=amd64 use $(ENVTEST_K8S_VERSION) -p path) |
There was a problem hiding this comment.
In some past version there was an envtest_k8s_version value that would only support amd64 since there's no arm64 artifacts available to download.
| # - podman machine ssh sudo rpm-ostree install qemu-user-static && sudo systemctl reboot | ||
| # from: https://github.com/containers/podman/issues/12144#issuecomment-955760527 | ||
| # related enhancements that may remove the need to manually install qemu-user-static https://bugzilla.redhat.com/show_bug.cgi?id=2061584 | ||
| DOCKER_BUILD_ARGS ?= --platform=linux/amd64 |
There was a problem hiding this comment.
we could pass --platform=linux/amd64,linux/arm64 and have simplified logic, but builds take longer
so, I think is best to use the fastest solution for development environment
| @@ -1,5 +1,7 @@ | |||
| # Build the manager binary | |||
| FROM quay.io/konveyor/builder:ubi9-latest AS builder | |||
There was a problem hiding this comment.
| FROM quay.io/konveyor/builder:ubi9-latest AS builder | |
| FROM --platform=$BUILDPLATFORM quay.io/konveyor/builder:ubi9-latest AS builder | |
| ARG BUILDPLATFORM |
| CLUSTER_OS = $(shell $(OC_CLI) get node -o jsonpath='{.items[0].status.nodeInfo.operatingSystem}' 2> /dev/null) | ||
| CLUSTER_ARCH = $(shell $(OC_CLI) get node -o jsonpath='{.items[0].status.nodeInfo.architecture}' 2> /dev/null) |
There was a problem hiding this comment.
Followup
| CLUSTER_OS = $(shell $(OC_CLI) get node -o jsonpath='{.items[0].status.nodeInfo.operatingSystem}' 2> /dev/null) | |
| CLUSTER_ARCH = $(shell $(OC_CLI) get node -o jsonpath='{.items[0].status.nodeInfo.architecture}' 2> /dev/null) | |
| CLUSTER_OS ?= $(shell $(OC_CLI) get node -o jsonpath='{.items[0].status.nodeInfo.operatingSystem}' 2> /dev/null) | |
| CLUSTER_ARCH ?= $(shell $(OC_CLI) get node -o jsonpath='{.items[0].status.nodeInfo.architecture}' 2> /dev/null) |
|
/lgtm |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: kaovilai, mateusoliveira43, shubham-pampattiwar, weshayutin The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
@mateusoliveira43: all tests passed! Full PR test history. Your PR dashboard. DetailsInstructions 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-sigs/prow repository. I understand the commands that are listed here. |
|
/cherry-pick oadp-1.4 |
|
@mateusoliveira43: new pull request created: #1485 DetailsIn 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-sigs/prow repository. |
Why the changes were made
Allow
make deploy-olmto also work in ARM clusters.Related to openshift/release#54877
How to test the changes made
Run
make deploy-olmon ARM and non ARM clusters and create DPA (to test quay images). Both should succeed.