Skip to content

OLS-0000 Add otel-collector image mirror to quickstart install - #390

Open
xrajesh wants to merge 1 commit into
openshift:mainfrom
xrajesh:quickstart/otel-mirror-idms
Open

OLS-0000 Add otel-collector image mirror to quickstart install#390
xrajesh wants to merge 1 commit into
openshift:mainfrom
xrajesh:quickstart/otel-mirror-idms

Conversation

@xrajesh

@xrajesh xrajesh commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Adds a new step (3/10) to the quickstart install.sh that creates an ImageDigestMirrorSet for the otel-collector image
  • Maps registry.redhat.io/openshift-lightspeed/otelcol-lightspeed-rhel9quay.io/redhat-user-workloads/crt-nshift-lightspeed-tenant/lightspeed-otel-collector so the cluster can pull the image when registry.redhat.io hasn't published it yet
  • Idempotent: skips if the IDMS already exists, skippable with SKIP_OTEL_MIRROR=1
  • Waits for MachineConfigPool to settle after IDMS creation (up to MCP_WAIT_TIMEOUT, default 600s)
  • Renumbers existing steps from 9 to 10 total

Test plan

  • Run install.sh on a cluster without prior IDMS — verify IDMS is created and MCP wait completes
  • Run install.sh again — verify IDMS step is skipped ("already exists")
  • Run with SKIP_OTEL_MIRROR=1 — verify step is skipped
  • Verify otel-collector pod starts successfully after install
  • Run uninstall.sh + reinstall — full cycle works

🤖 Generated with Claude Code

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 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jul 27, 2026

Copy link
Copy Markdown
📝 Walkthrough

Summary by CodeRabbit

  • New Features

    • Added an optional OpenTelemetry collector image mirror configuration during installation.
    • The installer now waits for the related platform configuration update to complete before continuing.
    • Added an option to skip the image mirror setup when needed.
  • Enhancements

    • Updated installation progress numbering to reflect the expanded ten-step workflow.

Walkthrough

The quickstart installer now includes an optional OpenTelemetry image mirror configuration step, waits for the MachineConfigPool update, and renumbers the complete installation flow from 9 stages to 10.

Changes

Quickstart installer

Layer / File(s) Summary
Configure OpenTelemetry image mirror
hack/quickstart/install.sh
Adds configurable ImageDigestMirrorSet setup, an optional SKIP_OTEL_MIRROR=1 bypass, and MachineConfigPool readiness polling.
Renumber installer stages
hack/quickstart/install.sh
Updates all stage indicators to reflect the new 1/10 through 10/10 sequence.

Sequence Diagram(s)

sequenceDiagram
  participant Installer
  participant OpenShiftAPI
  participant MachineConfigPool
  Installer->>OpenShiftAPI: Apply ImageDigestMirrorSet
  OpenShiftAPI->>MachineConfigPool: Start configuration update
  Installer->>MachineConfigPool: Poll update status
  MachineConfigPool-->>Installer: Report completed update
Loading
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title names the new otel-collector image mirror added to the quickstart install flow.
Description check ✅ Passed The description matches the change set and details the new IDMS step, skip flag, MCP wait, and renumbered steps.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

Comment @coderabbitai help to get the list of available commands.

@openshift-ci
openshift-ci Bot requested review from joshuawilson and onmete July 27, 2026 21:05
@openshift-ci

openshift-ci Bot commented Jul 27, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign joshuawilson for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@hack/quickstart/install.sh`:
- Around line 519-523: Update the IDMS handling around IDMS_NAME so an existing
ImageDigestMirrorSet is not skipped solely because its name matches. Compare its
configured source and target with the values derived from the current
environment, and reconcile or apply the manifest when they differ; retain the
skip behavior only when the existing configuration already matches.
- Around line 539-543: The MCP wait loop around mcp_updating must fail closed:
capture and validate the oc command result instead of masking failures with “||
true”, and only break after every MachineConfigPool reports the required
post-apply updated/settled state. Keep retrying on API errors, empty output, or
stale Updating=False status until MCP_WAIT_TIMEOUT, then follow the existing
timeout failure path.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: f9a05c8a-3635-431b-95ab-7189b376020a

📥 Commits

Reviewing files that changed from the base of the PR and between 410036e and 0fd7398.

📒 Files selected for processing (1)
  • hack/quickstart/install.sh
🔗 Linked repositories identified

CodeRabbit considers these linked repositories for cross-repo context during reviews:

  • openshift/lightspeed-agentic-sandbox (manual)

Comment on lines +519 to +523
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

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win

Reconcile existing IDMS configuration instead of trusting its name.

This branch skips any existing ols-otel-collector-mirror, even when its source or target differs from the current environment variables. Compare the existing spec with the desired values, or apply the manifest on every run and wait only when it changes.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@hack/quickstart/install.sh` around lines 519 - 523, Update the IDMS handling
around IDMS_NAME so an existing ImageDigestMirrorSet is not skipped solely
because its name matches. Compare its configured source and target with the
values derived from the current environment, and reconcile or apply the manifest
when they differ; retain the skip behavior only when the existing configuration
already matches.

Comment on lines +539 to +543
while (( local_elapsed < MCP_WAIT_TIMEOUT )); do
mcp_updating="$(oc get mcp -o jsonpath='{range .items[*]}{.status.conditions[?(@.type=="Updating")].status}{" "}{end}' 2>/dev/null || true)"
if [[ "${mcp_updating}" != *"True"* ]]; then
info "MachineConfigPool updated"
break

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🩺 Stability & Availability | 🟠 Major | ⚡ Quick win

Make the MCP wait fail closed.

|| true converts oc failures into empty output, and the predicate treats empty output or Updating=False as settled without requiring every pool to report the post-apply configuration as updated. A transient API error or stale status can let installation continue before nodes receive the mirror configuration.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@hack/quickstart/install.sh` around lines 539 - 543, The MCP wait loop around
mcp_updating must fail closed: capture and validate the oc command result
instead of masking failures with “|| true”, and only break after every
MachineConfigPool reports the required post-apply updated/settled state. Keep
retrying on API errors, empty output, or stale Updating=False status until
MCP_WAIT_TIMEOUT, then follow the existing timeout failure path.

@openshift-ci

openshift-ci Bot commented Jul 27, 2026

Copy link
Copy Markdown

@xrajesh: all tests passed!

Full PR test history. Your PR dashboard.

Details

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. I understand the commands that are listed here.

@iNecas

iNecas commented Jul 28, 2026

Copy link
Copy Markdown

I can confirm this fixes the issue at hand.

@vimalk78

Copy link
Copy Markdown
Contributor

/lgtm

@openshift-ci openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label Jul 29, 2026
@vimalk78

Copy link
Copy Markdown
Contributor

@xrajesh this does not work on HyperShift-hosted clusters

[3/10] Configuring otel-collector image mirror...
The imagedigestmirrorsets "ols-otel-collector-mirror" is invalid: : ValidatingAdmissionPolicy 'mirror' with binding 'mirror-binding' denied request: This resource cannot be created, updated, or deleted. Please ask your administrator to modify the resource in the HostedCluster object.

@openshift-ci openshift-ci Bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jul 31, 2026
@openshift-ci

openshift-ci Bot commented Jul 31, 2026

Copy link
Copy Markdown

PR needs rebase.

Details

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lgtm Indicates that a PR is ready to be merged. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants