che icon indicating copy to clipboard operation
che copied to clipboard

Installing Che on Red Hat OpenShift Local doesn't work on Mac M1 Max (Silicon CPU)

Open achdmbp opened this issue 1 year ago • 14 comments

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

image

Installation method

chectl/latest

Environment

macOS

Eclipse Che Logs

Che is not started yet

Additional context

No response

achdmbp avatar Sep 03 '24 16:09 achdmbp

Related issues:

https://github.com/eclipse-che/che/issues/21234 https://github.com/eclipse-che/che/issues/21783

tolusha avatar Sep 04 '24 14:09 tolusha

@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

adnanalawiyat avatar Sep 11 '24 01:09 adnanalawiyat

Sounds good, let's give a try.

tolusha avatar Sep 11 '24 07:09 tolusha

It seems we are good now https://quay.io/repository/eclipse/che-operator?tab=tags

tolusha avatar Sep 11 '24 10:09 tolusha

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

tolusha avatar Sep 11 '24 10:09 tolusha

Added multi-platform image build for che-server https://github.com/eclipse-che/che-server/pull/730

tolusha avatar Oct 21 '24 07:10 tolusha

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

tolusha avatar Oct 21 '24 08:10 tolusha

Done for quay.io/eclipse/che-tls-secret-creator https://github.com/che-incubator/che-tls-secret-creator

tolusha avatar Nov 28 '24 14:11 tolusha

UDI image https://github.com/devfile/developer-images/pull/192

tolusha avatar Dec 09 '24 08:12 tolusha

che-code image https://github.com/che-incubator/che-code/pull/496

tolusha avatar Feb 03 '25 09:02 tolusha

Final PR for testing all in one https://github.com/eclipse-che/che-operator/pull/1959

tolusha avatar Feb 04 '25 13:02 tolusha

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

tolusha avatar Mar 25 '25 09:03 tolusha

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 -    

tolusha avatar Jul 14 '25 14:07 tolusha

Unfortunately for now I cant even run crc: https://github.com/crc-org/crc/issues/4838

adietish avatar Jul 15 '25 15:07 adietish