Installing Che on Red Hat OpenShift Local doesn't work on Mac M1 Max (Silicon CPU)
Describe the bug
Following the guide Installing Che on Red Hat OpenShift Loca, on Mac M1 Max, results in following ErrImagePull when starting the che operator pod:
Failed to pull image "quay.io/eclipse/che-operator@sha256:4a00429de53b72e766ca0b1eca1ffe47cf7e48524a349f8582dbfda75219173c": choosing image instance: no image found in image index for architecture arm64, variant "v8", OS linux
Che version
7.91@latest
Steps to reproduce
Follow the guide Installing Che on Red Hat OpenShift Loca
Expected behavior
Eclipse Che is installed successfully on Openshift Local
Runtime
other (please specify in additional context)
Screenshots
Installation method
chectl/latest
Environment
macOS
Eclipse Che Logs
Che is not started yet
Additional context
No response
Related issues:
https://github.com/eclipse-che/che/issues/21234 https://github.com/eclipse-che/che/issues/21783
@tolusha i attempted to fix this issue with https://github.com/eclipse-che/che-operator/pull/1895
Is the PR complete ? Or something else is needed ?
This is my first code contribution, so feel free to let me know if anything is missing
Sounds good, let's give a try.
It seems we are good now https://quay.io/repository/eclipse/che-operator?tab=tags
I think the next step it to build che-server image for linux/arm64 platform https://github.com/eclipse-che/che-server/blob/main/.github/workflows/next-build.yml
@vinokurig
Added multi-platform image build for che-server https://github.com/eclipse-che/che-server/pull/730
Here are remaining images:
- quay.io/che-incubator/che-code:latest
- quay.io/devfile/universal-developer-image:ubi8-latest
- quay.io/eclipse/che-tls-secret-creator
Done for quay.io/eclipse/che-tls-secret-creator
https://github.com/che-incubator/che-tls-secret-creator
UDI image https://github.com/devfile/developer-images/pull/192
che-code image https://github.com/che-incubator/che-code/pull/496
Final PR for testing all in one https://github.com/eclipse-che/che-operator/pull/1959
We are blocked.
To deploy Eclipse Che on OpenShift, we need the following images [1] [2] built for the ARM64 platform. Unfortunately, they are only available for AMD64. Theoretically, we could use the upstream versions of these images, but [3] does not support the OpenShift provider.
[1] quay.io/openshift/origin-oauth-proxy:4.9 [2] quay.io/openshift/origin-kube-rbac-proxy:4.9 [3] https://github.com/oauth2-proxy/oauth2-proxy
The current workaround is to use downstream versions of the images:
ECLIPSE_CHE_PACKAGE_NAME="eclipse-che"
NEW_GATEWAY_AUTHENTICATION_IMAGE=registry.redhat.io/openshift4/ose-oauth-proxy:v4.14
NEW_GATEWAY_AUTHORIZATION_IMAGE=registry.redhat.io/openshift4/ose-kube-rbac-proxy:v4.14
ECLIPSE_CHE_SUBSCRIPTION=$(oc get subscriptions \
--all-namespaces -o jsonpath='{.items[?(@.spec.name=="eclipse-che")]}')
ECLIPSE_CHE_CSV_NAME=$(echo $ECLIPSE_CHE_SUBSCRIPTION | jq -r '.status.installedCSV')
ECLIPSE_CHE_CSV_NAMESPACE=$(echo $ECLIPSE_CHE_SUBSCRIPTION | jq -r '.metadata.namespace')
echo "Eclipse Che subscription '${ECLIPSE_CHE_CSV_NAME}' in namespace '${ECLIPSE_CHE_CSV_NAMESPACE}'"
GATEWAY_AUTHENTICATION_IMAGE=$(oc get clusterserviceversion $ECLIPSE_CHE_CSV_NAME \
--namespace $ECLIPSE_CHE_CSV_NAMESPACE \
-o jsonpath='{.spec.install.spec.deployments[0].spec.template.spec.containers[0].env[?(@.name=="RELATED_IMAGE_gateway_authentication_sidecar")].value}')
GATEWAY_AUTHORIZATION_IMAGE=$(oc get clusterserviceversion $ECLIPSE_CHE_CSV_NAME \
--namespace $ECLIPSE_CHE_CSV_NAMESPACE \
-o jsonpath='{.spec.install.spec.deployments[0].spec.template.spec.containers[0].env[?(@.name=="RELATED_IMAGE_gateway_authorization_sidecar")].value}')
echo "Replacing '${GATEWAY_AUTHENTICATION_IMAGE}' with '${NEW_GATEWAY_AUTHENTICATION_IMAGE}'"
echo "Replacing '${GATEWAY_AUTHORIZATION_IMAGE}' with '${NEW_GATEWAY_AUTHORIZATION_IMAGE}'"
oc get clusterserviceversion "$ECLIPSE_CHE_CSV_NAME" \
--namespace "$ECLIPSE_CHE_CSV_NAMESPACE" -o yaml | \
sed -e "s|$GATEWAY_AUTHENTICATION_IMAGE|$NEW_GATEWAY_AUTHENTICATION_IMAGE|g" \
-e "s|$GATEWAY_AUTHORIZATION_IMAGE|$NEW_GATEWAY_AUTHORIZATION_IMAGE|g" | \
oc apply -f -
Unfortunately for now I cant even run crc: https://github.com/crc-org/crc/issues/4838