From f69371e8ebfb087c9ea3ac743f85a8a5725047cf Mon Sep 17 00:00:00 2001 From: Liangquan Li Date: Wed, 25 Dec 2024 14:52:29 +0800 Subject: [PATCH] MCE: adjust hypershift-mce-install step to support disconnected OVERRIDE --- ...hypershift-release-4.18__periodics-mce.yaml | 1 + .../install/hypershift-mce-install-commands.sh | 18 +++++++++++++++++- .../install/hypershift-mce-install-ref.yaml | 5 ++++- 3 files changed, 22 insertions(+), 2 deletions(-) diff --git a/ci-operator/config/openshift/hypershift/openshift-hypershift-release-4.18__periodics-mce.yaml b/ci-operator/config/openshift/hypershift/openshift-hypershift-release-4.18__periodics-mce.yaml index b8f049e7f6ea2..99ee3bdcd0603 100644 --- a/ci-operator/config/openshift/hypershift/openshift-hypershift-release-4.18__periodics-mce.yaml +++ b/ci-operator/config/openshift/hypershift/openshift-hypershift-release-4.18__periodics-mce.yaml @@ -112,6 +112,7 @@ tests: env: LVM_OPERATOR_SUB_CHANNEL: stable-4.18 MCE_VERSION: "2.8" + OVERRIDE_HO_IMAGE: quay.io/hypershift/hypershift-operator:latest workflow: hypershift-mce-agent-disconnected-conformance - as: e2e-agent-disconnected-ovn-dualstack-metal3-conformance cron: 0 20 * * * diff --git a/ci-operator/step-registry/hypershift/mce/install/hypershift-mce-install-commands.sh b/ci-operator/step-registry/hypershift/mce/install/hypershift-mce-install-commands.sh index 2454267fbd4c6..cde5c37c554d1 100644 --- a/ci-operator/step-registry/hypershift/mce/install/hypershift-mce-install-commands.sh +++ b/ci-operator/step-registry/hypershift/mce/install/hypershift-mce-install-commands.sh @@ -224,6 +224,19 @@ echo "wait for addon to Available" oc wait --timeout=5m --for=condition=Available -n local-cluster ManagedClusterAddOn/hypershift-addon oc wait --timeout=5m --for=condition=Degraded=False -n local-cluster ManagedClusterAddOn/hypershift-addon if [[ ${OVERRIDE_HO_IMAGE} ]] ; then + if [[ $MCE_QE_CATALOG == "true" ]]; then + oc apply -f - < 2.3)}') )); then /tmp/${HYPERSHIFT_NAME} version; else /tmp/${HYPERSHIFT_NAME} --version; fi \ No newline at end of file +if (( $(awk 'BEGIN {print ("'"$MCE_VERSION"'" > 2.3)}') )); then /tmp/${HYPERSHIFT_NAME} version; else /tmp/${HYPERSHIFT_NAME} --version; fi + +# display HyperShift Operator Version +oc logs -n hypershift -lapp=operator --tail=-1 -c operator | head -1 | jq \ No newline at end of file diff --git a/ci-operator/step-registry/hypershift/mce/install/hypershift-mce-install-ref.yaml b/ci-operator/step-registry/hypershift/mce/install/hypershift-mce-install-ref.yaml index 326afdac291fe..2672b43f4e8e5 100644 --- a/ci-operator/step-registry/hypershift/mce/install/hypershift-mce-install-ref.yaml +++ b/ci-operator/step-registry/hypershift/mce/install/hypershift-mce-install-ref.yaml @@ -13,7 +13,10 @@ ref: documentation: If true, the QE catalog will be used to create MCE - name: OVERRIDE_HO_IMAGE default: "" - documentation: "Override the HyperShift operator image. If the default is an empty string, this will not override." + documentation: |- + Override the HyperShift operator image. If the default is an empty string, this will not override. + If in disconnected env also need to set MCE_QE_CATALOG: "true" + E.g: quay.io/hypershift/hypershift-operator:latest commands: hypershift-mce-install-commands.sh resources: requests: