From 0fd73987c399636f4ad5dcd385f7fc2911f14eb1 Mon Sep 17 00:00:00 2001 From: xavier Date: Mon, 27 Jul 2026 17:04:20 -0400 Subject: [PATCH] OLS-0000 Add otel-collector image mirror step to quickstart install The OLS bundle CSV references the otel-collector image at registry.redhat.io which may not be published yet. Add a new step (3/10) that creates an ImageDigestMirrorSet to pull the same digest from the Konflux quay.io repo as a fallback. The step is idempotent (skips if IDMS already exists) and can be disabled with SKIP_OTEL_MIRROR=1. After creating the IDMS, it waits for MachineConfigPool to finish updating before proceeding with the OLS install. Co-Authored-By: Claude Opus 4.6 --- hack/quickstart/install.sh | 69 ++++++++++++++++++++++++++++++++------ 1 file changed, 59 insertions(+), 10 deletions(-) diff --git a/hack/quickstart/install.sh b/hack/quickstart/install.sh index f95c56eb..1ed0e039 100755 --- a/hack/quickstart/install.sh +++ b/hack/quickstart/install.sh @@ -470,7 +470,7 @@ EOF # --- Step 1: Prerequisites --------------------------------------------------- -step "1/9" "Checking prerequisites..." +step "1/10" "Checking prerequisites..." command -v oc >/dev/null 2>&1 || fail "oc CLI not found. Install it first." info "oc CLI found" @@ -494,7 +494,7 @@ info "cluster-admin privileges confirmed" # --- Step 2: Namespace -------------------------------------------------------- -step "2/9" "Ensuring namespace ${NAMESPACE}..." +step "2/10" "Ensuring namespace ${NAMESPACE}..." if oc create namespace "${NAMESPACE}" 2>/dev/null; then info "Namespace created" @@ -504,9 +504,58 @@ else fail "Failed to create namespace ${NAMESPACE}" fi -# --- Step 3: Lightspeed Operator ---------------------------------------------- +# --- Step 3: Otel collector image mirror -------------------------------------- +# The OLS bundle CSV references registry.redhat.io/openshift-lightspeed/otelcol-lightspeed-rhel9 +# which may not be published yet. Create an ImageDigestMirrorSet so the cluster +# pulls the same digest from the Konflux quay.io repo instead. -step "3/9" "Lightspeed Operator..." +OTEL_MIRROR_SOURCE="${OTEL_MIRROR_SOURCE:-registry.redhat.io/openshift-lightspeed/otelcol-lightspeed-rhel9}" +OTEL_MIRROR_TARGET="${OTEL_MIRROR_TARGET:-quay.io/redhat-user-workloads/crt-nshift-lightspeed-tenant/lightspeed-otel-collector}" +IDMS_NAME="ols-otel-collector-mirror" +MCP_WAIT_TIMEOUT="${MCP_WAIT_TIMEOUT:-600}" + +step "3/10" "Configuring otel-collector image mirror..." + +if [ "${SKIP_OTEL_MIRROR:-}" = "1" ]; then + info "Skipped (SKIP_OTEL_MIRROR=1)" +elif oc get imagedigestmirrorset "${IDMS_NAME}" >/dev/null 2>&1; then + info "ImageDigestMirrorSet ${IDMS_NAME} already exists — skipping" +else + oc apply -f - </dev/null || true)" + if [[ "${mcp_updating}" != *"True"* ]]; then + info "MachineConfigPool updated" + break + fi + sleep 15 + local_elapsed=$((local_elapsed + 15)) + if (( local_elapsed % 60 == 0 )); then + echo " … MCP still updating (${local_elapsed}s/${MCP_WAIT_TIMEOUT}s)" + fi + done + if (( local_elapsed >= MCP_WAIT_TIMEOUT )); then + warn "MCP did not finish within ${MCP_WAIT_TIMEOUT}s — continuing (otel-collector may fail to pull until MCP settles)" + fi +fi + +# --- Step 4: Lightspeed Operator ---------------------------------------------- + +step "4/10" "Lightspeed Operator..." CONFIGURE_OLSCONFIG=0 @@ -574,7 +623,7 @@ fi # --- Step 4: Agentic Operator CRDs -------------------------------------------- -step "4/9" "Installing Agentic Operator CRDs..." +step "5/10" "Installing Agentic Operator CRDs..." for crd in "${CRD_FILES[@]}"; do if [ -n "${REPO_ROOT}" ]; then @@ -591,7 +640,7 @@ fi # --- Step 5: Agentic operator deployment -------------------------------------- -step "5/9" "Deploying agentic operator to ${NAMESPACE} (sandbox-mode=${SANDBOX_MODE})..." +step "6/10" "Deploying agentic operator to ${NAMESPACE} (sandbox-mode=${SANDBOX_MODE})..." oc apply -f - <