rabbitmq / cluster-operator

RabbitMQ Cluster Kubernetes Operator
https://www.rabbitmq.com/kubernetes/operator/operator-overview.html
Mozilla Public License 2.0
884 stars 273 forks source link

Migrating OLM testing pipeline from concourse to github-action #1569

Closed DanielePalaia closed 8 months ago

DanielePalaia commented 8 months ago

This PR is part of the task to migrate our Concourse pipelines to github actions:

It is migrating the OLM pipeline in order to test our OLM bundle in the cluster-operator: https://github.com/pivotal/rabbitmq-for-kubernetes-ci/blob/main/pipelines/olm-bundles/pipeline.yml

it can be useful to have a look to this guideline in order to see how to create and publish an OLM bundle: https://devopstales.github.io/home/oml/

The test images are stored in the environment variable specified in: DOCKER_REGISTRY_SERVER: quay.io/rabbitmqoperator OLM_IMAGE: rabbitmq-for-kubernetes-olm-cluster-operator OLM_INDEX_IMAGE: rabbitmq-for-kubernetes-olm-cluster-operator-index

The action is always testing the latest cluster operator manifest (the last tagged version). In case we run the action manually (through a workflow_dispatch) a generic 0.0.0 tag version is generated.

The cluster operator is deployed and configured in order to watch just on "rabbitmq-system-olm" namespace so that the K8s cluster can be shared with the action which is testing the deployment using the carvel Package Repository (which is deploying the cluster operator and watching in the default "rabbitmq-system" namespace)

The lock is needed in order to share the cluster with the future messaging topology operator action.

The create-olm-package job is a bit confusing and overcomplicated but this will be improved when we will improve the conversion bundle script in python.

The new action and the old publishing action (openshift.yml) have been merged together.

Action result here: https://github.com/rabbitmq/cluster-operator/actions/runs/8052246499

Manifests are uploaded here: https://github.com/rabbitmq/community-operators (operator-hub) https://github.com/rabbitmq/community-operators-prod (openshift-marketplace)

Then a manual PR to openshfit repos is needed

DanielePalaia commented 8 months ago

Taking in account Aitor review here: https://github.com/rabbitmq/OLM-Package-Repo/pull/8

DanielePalaia commented 8 months ago

I replaced git clone with checkout actions here too like suggested here: https://github.com/rabbitmq/messaging-topology-operator/pull/767. I will merge this one now to test it on the next operator release. We can come back with improments here when we improve the OLM Packaging script