Add medik8s-operator-subscribe Prow step for OLM operator installation#79547
Add medik8s-operator-subscribe Prow step for OLM operator installation#79547ugreener wants to merge 1 commit into
Conversation
|
/pj-rehearse auto-ack |
|
@ugreener: now processing your pj-rehearse request. Please allow up to 10 minutes for jobs to trigger or cancel. |
WalkthroughAdds a ci-operator step Changesmedik8s-operator-subscribe CI Step
Sequence DiagramsequenceDiagram
participant CI_Script as medik8s-operator-subscribe.sh
participant SharedDir
participant openshift_marketplace
participant ClusterAPI as oc/Kubernetes
CI_Script->>SharedDir: read proxy conf / catsrc_name (optional)
CI_Script->>ClusterAPI: oc apply namespace + OperatorGroup
CI_Script->>openshift_marketplace: poll PackageManifest for package (catalog label)
CI_Script->>ClusterAPI: oc apply Subscription (sourceNamespace: openshift-marketplace)
CI_Script->>ClusterAPI: poll Subscription -> installedCSV
CI_Script->>ClusterAPI: oc wait CSV conditions -> Succeeded (or emit diagnostics)
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Suggested labels
🚥 Pre-merge checks | ✅ 11 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (11 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: ugreener The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
@ugreener: no rehearsable tests are affected by this change |
017c405 to
baca569
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 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
`@ci-operator/step-registry/medik8s/operator-subscribe/medik8s-operator-subscribe-commands.sh`:
- Around line 137-141: The check only verifies OPERATORS is non-empty but not
that it yields any valid package names after splitting/trimming; update the
validation so after you parse/sanitize OPERATORS (the code that splits on commas
and trims entries around the parsing loop at the block handling OPERATORS
parsing — references: the OPERATORS variable and the parsing logic around lines
that iterate over entries), count non-empty package names and, if that count is
zero, print the same ERROR/Example messages and exit 1; apply the same
validation to the second parsing area mentioned (the other block handling
OPERATORS parsing) so the step fails fast when parsing yields no valid packages.
🪄 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: Repository YAML (base), Central YAML (inherited)
Review profile: CHILL
Plan: Enterprise
Run ID: aa239257-d6a2-49b6-8f76-8fdbad9346a3
📒 Files selected for processing (4)
ci-operator/step-registry/medik8s/operator-subscribe/OWNERSci-operator/step-registry/medik8s/operator-subscribe/medik8s-operator-subscribe-commands.shci-operator/step-registry/medik8s/operator-subscribe/medik8s-operator-subscribe-ref.metadata.jsonci-operator/step-registry/medik8s/operator-subscribe/medik8s-operator-subscribe-ref.yaml
✅ Files skipped from review due to trivial changes (1)
- ci-operator/step-registry/medik8s/operator-subscribe/OWNERS
Creates a reusable step that installs medik8s/RHWA operators via OLM Subscription from an existing CatalogSource. Supports installing multiple operators in a single step via comma-separated OPERATORS env var. Based on the cert-manager-install-operator pattern: verifies PackageManifest availability, creates Namespace + OperatorGroup + Subscriptions, waits for CSVs to reach Succeeded phase with comprehensive debug output on failure. Jira: RHWA-1021 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
baca569 to
157f949
Compare
|
[REHEARSALNOTIFIER] Note: If this PR includes changes to step registry files ( Interacting with pj-rehearseComment: Once you are satisfied with the results of the rehearsals, comment: |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 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
`@ci-operator/step-registry/medik8s/operator-subscribe/medik8s-operator-subscribe-commands.sh`:
- Around line 96-130: The function wait_for_csv currently waits up to 10m to see
.status.installedCSV and then an additional fixed 5m for the CSV to reach
Succeeded, allowing ~15m total; change the first polling loop (in wait_for_csv)
to only wait 5 minutes (e.g., reduce seq 1 60 to seq 1 30 with the same 10s
sleep) so the initial installedCSV wait is 5m and the subsequent oc wait
--timeout=5m keeps the per-operator end-to-end timeout to 10m; update the
user-facing attempt message if needed to match the new attempt count.
🪄 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: Repository YAML (base), Central YAML (inherited)
Review profile: CHILL
Plan: Enterprise
Run ID: 30e3fcaf-728f-42ba-bd2e-29cf95ca4c9f
📒 Files selected for processing (4)
ci-operator/step-registry/medik8s/operator-subscribe/OWNERSci-operator/step-registry/medik8s/operator-subscribe/medik8s-operator-subscribe-commands.shci-operator/step-registry/medik8s/operator-subscribe/medik8s-operator-subscribe-ref.metadata.jsonci-operator/step-registry/medik8s/operator-subscribe/medik8s-operator-subscribe-ref.yaml
✅ Files skipped from review due to trivial changes (2)
- ci-operator/step-registry/medik8s/operator-subscribe/OWNERS
- ci-operator/step-registry/medik8s/operator-subscribe/medik8s-operator-subscribe-ref.metadata.json
|
@ugreener: The following test failed, say
Full PR test history. Your PR dashboard. DetailsInstructions 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. |
Summary
Adds a reusable Prow step
medik8s-operator-subscribethat installs medik8s/RHWA operators via OLM Subscription from an existing CatalogSource. Designed to run after themedik8s-catalogsourcestep (PR #79373).What this step does
openshift-workload-availabilitywith privileged PSA labelsOPERATORS(comma-separated): verifies PackageManifest exists, creates SubscriptionDesign pattern
Based on the proven
cert-manager-install-operatorstep (used by 33+ nightly configs). Key additions:OPERATORSenv var${SHARED_DIR}/catsrc_namefor step chainingoptional-operators-subscribebehavior)Files
Test plan
Jira: RHWA-1021
Overview
This PR adds a reusable OpenShift CI Prow step named medik8s-operator-subscribe to the ci-operator step registry. The step automates installation of medik8s / RHWA operators via OLM Subscriptions and is intended to run after the medik8s-catalogsource step so it can consume the CatalogSource produced there.
Changes (practical impact)
Added files under ci-operator/step-registry/medik8s/operator-subscribe/ that affect OpenShift CI job execution and step registry metadata:
Design notes
Impact and next steps