[SRVCOM-4100] add OLMv1 support to build scripts#3951
[SRVCOM-4100] add OLMv1 support to build scripts#3951simkam wants to merge 1 commit intoopenshift-knative:mainfrom
Conversation
|
Skipping CI for Draft Pull Request. |
1b9e011 to
9894501
Compare
|
/lgtm |
da90930 to
e77e01c
Compare
|
/lgtm |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: maschmid, simkam 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 |
fixes https://issues.redhat.com/browse/SRVCOM-4100 Split catalogsource.bash to support both OLMv0 and OLMv1 operator lifecycle management: - catalog.bash: Shared utilities (image building, ICSP, mirroring) - olmv0_catalog.bash: CatalogSource and Subscription-based installation - olmv1_catalog.bash: ClusterCatalog and ClusterExtension-based installation The OLM_VERSION environment variable (default: v0) controls which installation method is used. OLMv1 introduces ClusterExtension CRs with ServiceAccount-based RBAC instead of OLMv0's Subscriptions. New OLMv1 configuration variables: - `OLMV1_CATALOG_NAME`, `OLMV1_CATALOG_PRIORITY` - `OLMV1_INSTALLER_SA`, `OLMV1_CLUSTEREXTENSION_NAME` - `OLMV1_UPGRADE_CONSTRAINT_POLICY` - `CATALOGD_NAMESPACE`, `OPERATOR_CONTROLLER_NAMESPACE` Code path BEFORE: ``` Makefile:dev └── hack/dev.sh ├── debugging.setup ├── create_namespaces (if INSTALL_WITH_ARGO_CD != "true") └── ensure_catalogsource_installed [catalogsource.bash:6-13] └── install_catalogsource [catalogsource.bash:15-...] ├── ensure_catalog_pods_running ├── default_serverless_operator_images ├── (if CI/DOCKER_REPO_OVERRIDE): │ ├── build_image "serverless-bundle" │ ├── oc adm policy add-role-to-group (image-puller permissions) │ └── build_image "serverless-index" ├── (else): │ ├── create_image_content_source_policy │ └── oc apply (ICSP) └── oc apply CatalogSource make install Makefile:install ├── install-tools └── hack/install.sh ├── debugging.setup ├── dump_state.setup ├── use_spot_instances ├── scale_up_workers ├── create_namespaces ├── install_certmanager (if INSTALL_CERTMANAGER=true) ├── ensure_content_source_policy ├── ensure_catalogsource_installed [catalogsource.bash:6-13] │ └── install_catalogsource [catalogsource.bash:15-...] │ └── (same as above) └── ensure_serverless_installed [serverless.bash:8-47] ├── (check if already installed) ├── enable_debug_log ├── determine csv version (inline logic) ├── remove_installplan (if not CURRENT_CSV) ├── deploy_serverless_operator [serverless.bash:93-117] │ ├── oc apply Subscription │ └── approve_csv │ ├── oc patch subscription │ ├── find_install_plan │ └── oc patch installplan └── install_knative_resources ├── deploy_knativeserving_cr ├── deploy_knativeeventing_cr ├── wait_for_knative_serving_ready ├── wait_for_knative_eventing_ready ├── deploy_knativekafka_cr (if INSTALL_KAFKA=true) └── wait_for_knative_kafka_ready (if INSTALL_KAFKA=true) ``` Code path AFTER: ``` OLM_VERSION=v0 (default) make dev Makefile:dev └── hack/dev.sh ├── debugging.setup ├── create_namespaces (if INSTALL_WITH_ARGO_CD != "true") └── ensure_catalog_installed └── ensure_catalogsource_installed [serverless.bash:112-116] └── install_catalogsource [olmv0_catalog.bash:149-156] ├── ensure_catalog_pods_running ├── default_serverless_operator_images ├── setup_olmv0_image_pull_permissions (if CI/DOCKER_REPO_OVERRIDE) ├── build_bundle_and_index_images (if CI/DOCKER_REPO_OVERRIDE) │ OR apply_icsp_for_konflux_index (if not CI) └── oc apply CatalogSource [olmv0_catalog.bash:180-190] make install Makefile:install ├── install-tools └── hack/install.sh ├── debugging.setup ├── dump_state.setup ├── use_spot_instances ├── scale_up_workers ├── create_namespaces ├── install_certmanager (if INSTALL_CERTMANAGER=true) ├── ensure_content_source_policy ├── ensure_catalog_installed │ └── ensure_catalogsource_installed [serverless.bash:112-116] │ └── install_catalogsource [olmv0_catalog.bash:149-156] │ └── (same as above) └── ensure_serverless_installed └── ensure_serverless_installed_olmv0 [serverless.bash:82-86] ├── check_serverless_already_installed ├── enable_debug_log ├── determine_csv_version ├── remove_installplan (if not CURRENT_CSV) ├── deploy_serverless_operator_olmv0 [olmv0_catalog.bash:99-123] │ ├── oc apply Subscription │ └── approve_csv │ ├── oc patch subscription │ ├── find_install_plan │ └── oc patch installplan └── install_knative_resources ├── deploy_knativeserving_cr ├── deploy_knativeeventing_cr ├── wait_for_knative_serving_ready ├── wait_for_knative_eventing_ready ├── deploy_knativekafka_cr (if INSTALL_KAFKA=true) └── wait_for_knative_kafka_ready (if INSTALL_KAFKA=true) --- OLM_VERSION=v1 make dev Makefile:dev └── hack/dev.sh ├── debugging.setup ├── create_namespaces (if INSTALL_WITH_ARGO_CD != "true") └── ensure_catalog_installed └── ensure_clustercatalog_installed [serverless.bash:112-116] └── install_clustercatalog [olmv1_catalog.bash:3-10] ├── default_serverless_operator_images ├── setup_olmv1_image_pull_permissions (if CI/DOCKER_REPO_OVERRIDE) ├── build_bundle_and_index_images (if CI/DOCKER_REPO_OVERRIDE) │ OR apply_icsp_for_konflux_index (if not CI) ├── oc apply ClusterCatalog [olmv1_catalog.bash:35-47] └── oc wait for ClusterCatalog Serving make install Makefile:install ├── install-tools └── hack/install.sh ├── debugging.setup ├── dump_state.setup ├── use_spot_instances ├── scale_up_workers ├── create_namespaces ├── install_certmanager (if INSTALL_CERTMANAGER=true) ├── ensure_content_source_policy ├── ensure_catalog_installed │ └── ensure_clustercatalog_installed [serverless.bash:112-116] │ └── install_clustercatalog [olmv1_catalog.bash:12-53] │ └── (same as above) └── ensure_serverless_installed └── ensure_serverless_installed_olmv1 [serverless.bash:82-86] ├── check_serverless_already_installed ├── enable_debug_log ├── determine_csv_version ├── deploy_serverless_operator_olmv1 [olmv1_catalog.bash:117-151] │ ├── setup_olmv1_serviceaccount │ │ ├── oc apply ServiceAccount │ │ └── oc apply ClusterRoleBinding (cluster-admin) │ ├── oc apply ClusterExtension │ └── wait_for_clusterextension_ready └── install_knative_resources ├── deploy_knativeserving_cr ├── deploy_knativeeventing_cr ├── wait_for_knative_serving_ready ├── wait_for_knative_eventing_ready ├── deploy_knativekafka_cr (if INSTALL_KAFKA=true) └── wait_for_knative_kafka_ready (if INSTALL_KAFKA=true) ```
|
New changes are detected. LGTM label has been removed. |
|
rebased |
|
@simkam: The following tests 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. |
fixes https://issues.redhat.com/browse/SRVCOM-4100
Split catalogsource.bash to support both OLMv0 and OLMv1 operator lifecycle management:
The OLM_VERSION environment variable (default: v0) controls which installation method is used. OLMv1 introduces ClusterExtension CRs with ServiceAccount-based RBAC instead of OLMv0's Subscriptions.
New OLMv1 configuration variables:
OLMV1_CATALOG_NAME,OLMV1_CATALOG_PRIORITYOLMV1_INSTALLER_SA,OLMV1_CLUSTEREXTENSION_NAMEOLMV1_UPGRADE_CONSTRAINT_POLICYCATALOGD_NAMESPACE,OPERATOR_CONTROLLER_NAMESPACETests pass locally:
CI (periodic for now) will be added by openshift-knative/hack#857
Code path BEFORE:
Code path AFTER:
Usual note nowadays - written with help from AI - Google Gemini and Claude Code.