-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adapt the operator CI install script to work on non OCP-clusters #487
base: main
Are you sure you want to change the base?
Adapt the operator CI install script to work on non OCP-clusters #487
Conversation
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/cherry-pick release-1.4 |
@rm3l: once the present PR merges, I will cherry-pick it on top of In response to this:
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. |
/cc @zdrapela This should help with testing downstream CI builds of the operator on non-OCP clusters. |
44f8a23
to
7f29b52
Compare
…on on a standard Kubernetes cluster Just like with OCP clusters with hosted control planes (where we cannot use ICSP/IDMS resources), we are doing the following here: 1. Deploy an authenticated registry (there may not be any internal registry available, unlike OCP) 2. Expose this registry via port-forwarding and using a NodePort (to be able to pull it from within the cluster) 3. Replacing all references to the internal RH registry with quay.io in the bundles, repack and push the bundles to the registry above 4. Regenerate the IIB and build it in the cluster (using Kaniko, because the script might be called from CI where Podman cannot run) 5. Create the CatalogSource using this new IIB ref
…out and also better handle exit codes
7f29b52
to
4333adf
Compare
Description
As depicted in https://issues.redhat.com/browse/RHIDP-4994, the current script and procedure for installing CI builds of the operator are tied to OpenShift (use of ICSP/IDMS resources, leveraging the internal OCP cluster registry, ...).
To unblock https://issues.redhat.com/browse/RHIDP-4550 (testing operator CI builds on GKE), this PR adapts this script to make it work on standard Kubernetes clusters. Ultimately, we should be able to use the same script to test the operator on our other supported platforms like EKS or AKS.
Note that this requires OLM to be installed in the cluster as a prerequisite since this is what we support.
The logic to install the operator on K8s is quite similar to how we adapted the script in #369 to make it work on OCP clusters with hosted control planes (by unpacking the bundles, replacing the refs to the internal RH registries, then pushing them to the cluster registry ): it starts by deploying a registry and does essentially the same things.
NOTE (for later): the script is getting big => we might need to break it down into smaller files. This is an intentional tech debt that will be addressed later (issue TBD).
Which issue(s) does this PR fix or relate to
PR acceptance criteria
rhdh-operator.clusterserviceversion.yaml
file accordinglyHow to test changes / Special notes to the reviewer
More details in https://github.com/rm3l/redhat-developer-hub-operator/blob/RHIDP-4994--adapt-operator-ci-script-to-work-on-non-ocp-clusters/.rhdh/docs/installing-ci-builds.adoc#prerequisites
.rhdh/scripts/install-rhdh-catalog-source.sh
script against a standard Kubernetes cluster. OLM is required.$ kubectl patch serviceaccount default -p '{"imagePullSecrets": [{"name": "rhdh-pull-secret"}]}'