Repository navigation
feat(plugin-infra): add OLM v1 ClusterExtension manifests for orchestrator (#14791) - #3555
Conversation
PR Summary by QodoAdd OLM v1 support to orchestrator plugin infrastructure
AI Description
Diagram
High-Level Assessment
Files changed (3)
|
Code Review by Qodo
1.
|
|
Important The |
2031fd8 to
86bee84
Compare
|
/agentic_review |
|
Code review by qodo was updated up to the latest commit 86bee84 |
dd3109e to
1e7bc6e
Compare
…rator Add serverless-v1.yaml and serverless-logic-v1.yaml with installer RBAC and ClusterExtension resources, and teach plugin-infra.sh to auto-detect OLM version (or force via --olm-version) mirroring orchestrator-infra chart. Address Qodo review: safe v1 teardown ordering, ClusterCatalog prerequisite checks, reliable CRD detection, delete both v0/v1 families, Helm ownership guards, Makefile OLM_VERSION forwarding, nonempty catalog list checks, per-resource v0 delete with ownership labels, --olm-version arg validation, CRD-guarded delete paths for unavailable OLM APIs, and Sonar literal constants. Document OLM v1 behavior in orchestrator, developer, and orchestrator-cicd guides. RHIDP-14791 Signed-off-by: Fortune Ndlovu <fndlovu@redhat.com>
1e7bc6e to
40d6f4f
Compare
This commit addresses review feedback from PR redhat-developer#3555: 1. Fix race condition in resource_exists() by combining two kubectl calls into a single call with captured output and exit code. 2. Prevent duplicate operator installations during cluster upgrades by detecting existing v0 Subscriptions before auto-selecting v1. When operators are already installed via v0 and the cluster gains OLM v1 capabilities, the script now stays with v0 and advises the user to explicitly migrate. 3. Replace polling loop in wait_for_clusterextension_deleted() with kubectl wait --for=delete for cleaner implementation. 4. Remove crdUpgradeSafety enforcement: None from ClusterExtension manifests to enable default safety checks during operator upgrades. Signed-off-by: Fortune Ndlovu <fndlovu@redhat.com>
…ra_managed The jsonpath syntax for accessing labels with dots in the key name was incorrect. Using bracket notation with variable expansion doesn't work in jsonpath - the dots must be escaped when using dot notation. Without this fix, is_plugin_infra_managed() always returns false, causing deletion to skip all plugin-infra managed resources. Signed-off-by: Fortune Ndlovu <fndlovu@redhat.com>
|
✅ PR images built and pushed successfully! Images are available for testing (expires in 7 days):
|
rm3l
left a comment
There was a problem hiding this comment.
Looks good, but can you address the ShellCheck warnings reported?
ShellCheck was reporting SC2034 warning about PLUGIN_INFRA_LABEL_KEY being unused. The variable was originally used in jsonpath queries but was replaced with a hardcoded label path to fix jsonpath syntax issues. Since the label key is hardcoded in the jsonpath expression and unlikely to change, removing the unused variable. Signed-off-by: Fortune Ndlovu <fndlovu@redhat.com>
|
✅ PR images built and pushed successfully! Images are available for testing (expires in 7 days):
|
…ension-manifests-for-plugin-infra-operators
|
|
✅ PR images built and pushed successfully! Images are available for testing (expires in 7 days):
|



Summary
Adds an OLM v1 install path for orchestrator plugin-infra only (OpenShift Serverless + Serverless Logic). ArgoCD and Pipelines remain on the existing v0 Subscription manifests.
serverless-v1.yamlandserverless-logic-v1.yamlwith installer ServiceAccount, ClusterRoleBinding (cluster-admin), and ClusterExtension resources (catalog selector:openshift-redhat-operators)plugin-infra.shto auto-detect OLM version or force via--olm-version v0|v1|autoserverless.yaml,serverless-logic.yaml) unchanged; both paths still applyknative.yamlafter operator CRDs are availablerhdh.redhat.com/managed-by: plugin-infra; the script skips Helm-managed resources on apply/deleteMakefileforwardsOLM_VERSIONtomake plugin-infra/make plugin-infra-undeployFixes: https://redhat.atlassian.net/browse/RHIDP-14659
Test plan
Prerequisites
oc/kubectlaccess and cluster-adminopenshift-redhat-operatorsClusterCatalog)test from a local clone (recommended for this PR)
git clone https://github.com/Fortune-Ndlovu/rhdh-operator.git cd rhdh-operator git checkout RHIDP-14791-operator-add-olm-v-1-cluster-extension-manifests-for-plugin-infra-operators1. OLM v0 path (works on ROSA / clusters without OLM v1)
Expected: script prints
Using OLM v0; Subscriptions and Knative CRs are created/removed; no ClusterExtension resources.2. Auto-detect on a non-OLM-v1 cluster
Expected: script prints
Auto-detected OLM v0 (OLM v1 CRDs not found)and behaves like the v0 test above.3. OLM v1 path (requires OLM v1 cluster)
Expected: ClusterExtensions reach
Installed; Knative Serving/Eventing become Ready; delete removes ClusterExtensions before installer RBAC/namespaces.4. Makefile targets
# From repo root make plugin-infra PROFILE=rhdh OLM_VERSION=v0 make plugin-infra-undeploy PROFILE=rhdh OLM_VERSION=v0