From 19080a25eac248f4d8fb491d9600ffb1ff80113d Mon Sep 17 00:00:00 2001 From: Aitor Perez <1515757+Zerpet@users.noreply.github.com> Date: Mon, 23 Jun 2025 11:50:28 +0100 Subject: [PATCH 1/5] ci: fix workflow to generate CRD reference docs --- ...pology-operator.clusterserviceversion.yaml | 601 ++++++++++++++++++ olm/bundle/manifests/rabbitmq.com_binding.yml | 140 ++++ .../manifests/rabbitmq.com_exchange.yml | 139 ++++ .../manifests/rabbitmq.com_federation.yml | 199 ++++++ .../manifests/rabbitmq.com_operatorpolicy.yml | 156 +++++ .../manifests/rabbitmq.com_permission.yml | 152 +++++ olm/bundle/manifests/rabbitmq.com_policy.yml | 158 +++++ olm/bundle/manifests/rabbitmq.com_queue.yml | 155 +++++ .../rabbitmq.com_schemareplication.yml | 155 +++++ olm/bundle/manifests/rabbitmq.com_shovel.yml | 238 +++++++ .../manifests/rabbitmq.com_superstream.yml | 144 +++++ .../rabbitmq.com_topicpermission.yml | 151 +++++ olm/bundle/manifests/rabbitmq.com_user.yml | 194 ++++++ olm/bundle/manifests/rabbitmq.com_vhost.yml | 159 +++++ .../rabbitmq-cluster-operator/catalog.yaml | 32 + .../catalog.yaml | 234 +++++++ 16 files changed, 3007 insertions(+) create mode 100644 olm/bundle/manifests/rabbitmq-messaging-topology-operator.clusterserviceversion.yaml create mode 100644 olm/bundle/manifests/rabbitmq.com_binding.yml create mode 100644 olm/bundle/manifests/rabbitmq.com_exchange.yml create mode 100644 olm/bundle/manifests/rabbitmq.com_federation.yml create mode 100644 olm/bundle/manifests/rabbitmq.com_operatorpolicy.yml create mode 100644 olm/bundle/manifests/rabbitmq.com_permission.yml create mode 100644 olm/bundle/manifests/rabbitmq.com_policy.yml create mode 100644 olm/bundle/manifests/rabbitmq.com_queue.yml create mode 100644 olm/bundle/manifests/rabbitmq.com_schemareplication.yml create mode 100644 olm/bundle/manifests/rabbitmq.com_shovel.yml create mode 100644 olm/bundle/manifests/rabbitmq.com_superstream.yml create mode 100644 olm/bundle/manifests/rabbitmq.com_topicpermission.yml create mode 100644 olm/bundle/manifests/rabbitmq.com_user.yml create mode 100644 olm/bundle/manifests/rabbitmq.com_vhost.yml create mode 100644 olm/catalog/cool-catalog/rabbitmq-cluster-operator/catalog.yaml create mode 100644 olm/catalog/cool-catalog/rabbitmq-messaging-topology-operator/catalog.yaml diff --git a/olm/bundle/manifests/rabbitmq-messaging-topology-operator.clusterserviceversion.yaml b/olm/bundle/manifests/rabbitmq-messaging-topology-operator.clusterserviceversion.yaml new file mode 100644 index 00000000..e9069206 --- /dev/null +++ b/olm/bundle/manifests/rabbitmq-messaging-topology-operator.clusterserviceversion.yaml @@ -0,0 +1,601 @@ +apiVersion: operators.coreos.com/v1alpha1 +kind: ClusterServiceVersion +metadata: + name: rabbitmq-messaging-topology-operator.v0.0.0 + namespace: placeholder + annotations: + alm-examples: | + [{"apiVersion":"rabbitmq.com/v1beta1","kind":"Binding","metadata":{"name":"test"},"spec":{"rabbitmqClusterReference":{"name":"rabbitmq-cluster"}}},{"apiVersion":"rabbitmq.com/v1beta1","kind":"Exchange","metadata":{"name":"test"},"spec":{"rabbitmqClusterReference":{"name":"rabbitmq-cluster"}}},{"apiVersion":"rabbitmq.com/v1beta1","kind":"Federation","metadata":{"name":"test"},"spec":{"rabbitmqClusterReference":{"name":"rabbitmq-cluster"}}},{"apiVersion":"rabbitmq.com/v1beta1","kind":"Permission","metadata":{"name":"test"},"spec":{"rabbitmqClusterReference":{"name":"rabbitmq-cluster"}}},{"apiVersion":"rabbitmq.com/v1beta1","kind":"Policy","metadata":{"name":"test"},"spec":{"rabbitmqClusterReference":{"name":"rabbitmq-cluster"}}},{"apiVersion":"rabbitmq.com/v1beta1","kind":"OperatorPolicy","metadata":{"name":"test"},"spec":{"rabbitmqClusterReference":{"name":"rabbitmq-cluster"}}},{"apiVersion":"rabbitmq.com/v1beta1","kind":"Queue","metadata":{"name":"test"},"spec":{"rabbitmqClusterReference":{"name":"rabbitmq-cluster"}}},{"apiVersion":"rabbitmq.com/v1beta1","kind":"SchemaReplication","metadata":{"name":"test"},"spec":{"rabbitmqClusterReference":{"name":"rabbitmq-cluster"}}},{"apiVersion":"rabbitmq.com/v1beta1","kind":"Shovel","metadata":{"name":"test"},"spec":{"rabbitmqClusterReference":{"name":"rabbitmq-cluster"}}},{"apiVersion":"rabbitmq.com/v1alpha1","kind":"SuperStream","metadata":{"name":"test"},"spec":{"rabbitmqClusterReference":{"name":"rabbitmq-cluster"}}},{"apiVersion":"rabbitmq.com/v1beta1","kind":"User","metadata":{"name":"test"},"spec":{"rabbitmqClusterReference":{"name":"rabbitmq-cluster"}}},{"apiVersion":"rabbitmq.com/v1beta1","kind":"Vhost","metadata":{"name":"test"},"spec":{"rabbitmqClusterReference":{"name":"rabbitmq-cluster"}}},{"apiVersion":"rabbitmq.com/v1beta1","kind":"TopicPermission","metadata":{"name":"test"},"spec":{"rabbitmqClusterReference":{"name":"rabbitmq-cluster"}}}] + categories: Streaming & Messaging + certified: "false" + createdAt: 2025-07-04T16:55:35 + description: Kubernetes operator to allow developers to create and manage RabbitMQ messaging topologies within a RabbitMQ cluster using a declarative Kubernetes API. + containerImage: quay.io/rabbitmqoperator/messaging-topology-operator:latest + support: VMware Tanzu + capabilities: Full Lifecycle + repository: https://github.com/rabbitmq/messaging-topology-operator +spec: + displayName: rabbitmq-messaging-topology-operator + description: | + ## About the managed application + RabbitMQ is an open-source message-broker software that originally implemented the Advanced Message Queuing Protocol and has since been extended with a plug-in architecture to support Streaming Text Oriented Messaging Protocol, MQ Telemetry Transport, and other protocols. + ## About this Operator + Kubernetes operator to allow developers to create and manage RabbitMQ messaging topologies within a RabbitMQ cluster using a declarative Kubernetes API. A Messaging topology is the collection of objects such as exchanges, queues, bindings and policies that provides specific messaging or streaming scenario. This operator is used with RabbitMQ clusters deployed via the RabbitMQ Cluster Kubernetes Operator. This repository contains custom controllers and custom resource definitions (CRDs) enabling a declarative API for RabbitMQ messaging topologies. + ## Prerequisites for enabling this Operator + The operator works on top of the RabbitMQ cluster operator. + Messaging Topology Operator is tested with the latest release of RabbitMQ Cluster Operator. It uses the generated default user secret from RabbitmqCluster (set in rabbitmqcluster.status.binding) to authenticate with RabbitMQ server. + maturity: stable + version: 0.0.0 + support: Community based + keywords: + - rabbitmq + - messaging + - amqp + - amqp10 + - stomp + - mqtt + - mqtt5 + - queues + - streaming + maintainers: + - name: VMware Tanzu + email: rabbitmq-users@googlegroups.com + provider: + name: VMware Tanzu + labels: {} + selector: + matchLabels: {} + links: + - name: GitHub + url: https://github.com/rabbitmq/messaging-topology-operator + - name: Documentation + url: https://www.rabbitmq.com/kubernetes/operator/install-topology-operator.html + icon: + - base64data: iVBORw0KGgoAAAANSUhEUgAAAOQAAABACAYAAAAK2tt1AAAK4WlDQ1BJQ0MgUHJvZmlsZQAASImVlwdUk8kWgOf/00NCgIQqJfSOdAJICaEFUJAOohKSQEIJMSEoiA1ZXMFVQUQEywquiii4uhRZCyKKFcWGfUEWBeW5WLCB8n7gEXb3nffeeTdnMt+5uXPLnJmcOwCQQzhicTqsBECGKEsSHuBDj42Lp+OeAxwgAyJwBpYcrlTMDAsLAYjMzH+VD/cANDnftp709e+//1dR4fGlXACgBISTeFJuBsJtyBjhiiVZAKCOIXrD5VniSb6DME2CJIjw4CSnTPP4JCdNMVppyiYynIWwEQB4EocjSQGAZIvo6dncFMQPKQxhWxFPKEJ4LcKeXAGHhzASF1hlZGRO8jDCZoi9GAAyDWFG0p98pvzFf5LcP4eTIufpuqYE7yuUitM5Of/n1vxvyUiXzcQwQQZJIAkMR2YNZP/up2UGy1mUtCB0hoW8KfspFsgCo2aYK2XFzzCP4xssX5u+IGSGk4X+bLmfLHbkDPOlfhEzLMkMl8dKlrCYM8yRzMaVpUXJ9QI+W+4/VxAZM8PZwugFMyxNiwietWHJ9RJZuDx/vijAZzauv7z2DOmf6hWy5WuzBJGB8to5s/nzRcxZn9JYeW48vq/frE2U3F6c5SOPJU4Pk9vz0wPkeml2hHxtFnI4Z9eG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ldxVAHlhEqc1XeUMILSSioQjPuRIKJ+wOo54emYERhvr0Bd4wNeHgY6rrZ+vHXDw8n4kBCnojDgznYQhfFk4vt9Gg5FcwCCOEgXjOA/GaB8xeNZ5QEpck6SQAQ71QB/n5vjWM97nfb00u6jApVPDoVn2JSRwSCyS0D9zLj1DF2wqaZSDXmhP/ZcF1JdnxWyt9yMkHIJO0KrNmuPUyRF11NHQR7KE1oi1l3ztjsQgYUJYsEHsbxzRhwLdIMNoCjzqtxU4/acHGVM6b9e90aWxIKrwlwQAAQL0KCAlSAKSkZApXH0opORCfdwd7kXKfoSEQ2qaFNK+d5tGBcXmUzzWr7Ja5zglI/rhlMAikdCGa6ZzdFq0EwP1UFEs9JOUxFOs0Hi2QUd8aR42R9RWHMhAD38daNfy/md6Fa/HdOb6ZSQck1FKmqNVypY4NGR4RAFPOxiBgQ/CkTi5cdqf04kPEJ51bGu93/9+1aqBjTMLmAUmC9imzmQKq5gF1reAEXL9e2AamAUmCxghJ1NYxSywvgWMkOvfA9PALDBZwAg5mcIqZoH1LWCEXP8emAZmgckCRsjJFFYxC6xvASPk+vfANDALTBYwQk6msIpZYH0LGCHXvwemgVlgsoARcjKFVcwC61vACLn+PTANzAKTBYyQkymsYhZY3wJGyPXvgWlgFpgsYIScTGEVs8D6FvgfHDmp0QzloI4AAAAASUVORK5CYII= + mediatype: image/png + customresourcedefinitions: + owned: + - name: bindings.rabbitmq.com + displayName: Binding + kind: Binding + version: v1beta1 + description: Binding + - name: exchanges.rabbitmq.com + displayName: Exchange + kind: Exchange + version: v1beta1 + description: Exchange + - name: federations.rabbitmq.com + displayName: Federation + kind: Federation + version: v1beta1 + description: Federation + - name: permissions.rabbitmq.com + displayName: Permission + kind: Permission + version: v1beta1 + description: Permission + - name: topicpermissions.rabbitmq.com + displayName: TopicPermission + kind: TopicPermission + version: v1beta1 + description: TopicPermission + - name: policies.rabbitmq.com + displayName: Policy + kind: Policy + version: v1beta1 + description: Policy + - name: operatorpolicies.rabbitmq.com + displayName: OperatorPolicy + kind: OperatorPolicy + version: v1beta1 + description: OperatorPolicy + - name: queues.rabbitmq.com + displayName: Queue + kind: Queue + version: v1beta1 + description: Queue + - name: schemareplications.rabbitmq.com + displayName: SchemaReplication + kind: SchemaReplication + version: v1beta1 + description: Schema Replication + - name: shovels.rabbitmq.com + displayName: Shovel + kind: Shovel + version: v1beta1 + description: Shovel + - name: superstreams.rabbitmq.com + displayName: SuperStream + kind: SuperStream + version: v1alpha1 + description: Super Stream + - name: users.rabbitmq.com + displayName: User + kind: User + version: v1beta1 + description: User + - name: vhosts.rabbitmq.com + displayName: Vhost + kind: Vhost + version: v1beta1 + description: Vhost + required: + - name: rabbitmqclusters.rabbitmq.com + displayName: RabbitmqCluster + kind: RabbitmqCluster + version: v1beta1 + description: Rabbitmq Cluster + nativeAPIs: + - version: v1 + group: "" + kind: Secret + - version: v1 + group: "" + kind: Service + install: + strategy: deployment + spec: + permissions: + - serviceAccountName: messaging-topology-operator + rules: + - apiGroups: + - coordination.k8s.io + resources: + - leases + verbs: + - get + - list + - watch + - create + - update + - patch + - delete + - apiGroups: + - "" + resources: + - events + verbs: + - create + - apiGroups: + - "" + resources: + - configmaps + verbs: + - get + - list + - watch + - create + - update + - patch + - delete + clusterPermissions: + - serviceAccountName: messaging-topology-operator + rules: + - apiGroups: + - "" + resources: + - events + verbs: + - create + - get + - patch + - apiGroups: + - "" + resources: + - secrets + verbs: + - create + - get + - list + - watch + - apiGroups: + - "" + resources: + - services + verbs: + - get + - list + - watch + - apiGroups: + - rabbitmq.com + resources: + - bindings + - exchanges + - federations + - operatorpolicies + - permissions + - policies + - queues + - schemareplications + - shovels + - superstreams + - topicpermissions + - users + - vhosts + verbs: + - create + - delete + - get + - list + - patch + - update + - watch + - apiGroups: + - rabbitmq.com + resources: + - bindings/finalizers + - exchanges/finalizers + - federations/finalizers + - operatorpolicies/finalizers + - permissions/finalizers + - policies/finalizers + - queues/finalizers + - schemareplications/finalizers + - shovels/finalizers + - superstreams/finalizers + - topicpermissions/finalizers + - users/finalizers + - vhosts/finalizers + verbs: + - update + - apiGroups: + - rabbitmq.com + resources: + - bindings/status + - exchanges/status + - federations/status + - operatorpolicies/status + - permissions/status + - policies/status + - queues/status + - schemareplications/status + - shovels/status + - superstreams/status + - topicpermissions/status + - users/status + - vhosts/status + verbs: + - get + - patch + - update + - apiGroups: + - rabbitmq.com + resources: + - rabbitmqclusters + verbs: + - get + - list + - watch + - apiGroups: + - rabbitmq.com + resources: + - rabbitmqclusters/status + verbs: + - get + deployments: + - label: + app.kubernetes.io/component: rabbitmq-operator + app.kubernetes.io/name: messaging-topology-operator + app.kubernetes.io/part-of: rabbitmq + name: messaging-topology-operator + spec: + replicas: 1 + selector: + matchLabels: + app.kubernetes.io/name: messaging-topology-operator + template: + metadata: + labels: + app.kubernetes.io/component: rabbitmq-operator + app.kubernetes.io/name: messaging-topology-operator + app.kubernetes.io/part-of: rabbitmq + spec: + containers: + - command: + - /manager + env: + - name: OPERATOR_NAMESPACE + valueFrom: + fieldRef: + fieldPath: metadata.namespace + - name: OPERATOR_SCOPE_NAMESPACE + valueFrom: + fieldRef: + fieldPath: metadata.annotations['olm.targetNamespaces'] + image: quay.io/rabbitmqoperator/messaging-topology-operator:latest + imagePullPolicy: Always + name: manager + ports: + - containerPort: 9443 + name: webhook-server + protocol: TCP + resources: + limits: + cpu: 300m + memory: 500Mi + requests: + cpu: 100m + memory: 100Mi + volumeMounts: + - mountPath: /tmp/k8s-webhook-server/serving-certs + name: cert + readOnly: true + serviceAccountName: messaging-topology-operator + terminationGracePeriodSeconds: 10 + volumes: + - name: cert + secret: + defaultMode: 420 + secretName: webhook-server-cert + webhookdefinitions: + - type: ValidatingAdmissionWebhook + admissionReviewVersions: + - v1 + containerPort: 443 + targetPort: 9443 + deploymentName: messaging-topology-operator + failurePolicy: Fail + generateName: vbinding.kb.io + rules: + - apiGroups: + - rabbitmq.com + apiVersions: + - v1beta1 + operations: + - CREATE + - UPDATE + resources: + - bindings + sideEffects: None + webhookPath: /validate-rabbitmq-com-v1beta1-binding + - type: ValidatingAdmissionWebhook + admissionReviewVersions: + - v1 + containerPort: 443 + targetPort: 9443 + deploymentName: messaging-topology-operator + failurePolicy: Fail + generateName: vexchange.kb.io + rules: + - apiGroups: + - rabbitmq.com + apiVersions: + - v1beta1 + operations: + - CREATE + - UPDATE + resources: + - exchanges + sideEffects: None + webhookPath: /validate-rabbitmq-com-v1beta1-exchange + - type: ValidatingAdmissionWebhook + admissionReviewVersions: + - v1 + containerPort: 443 + targetPort: 9443 + deploymentName: messaging-topology-operator + failurePolicy: Fail + generateName: vfederation.kb.io + rules: + - apiGroups: + - rabbitmq.com + apiVersions: + - v1beta1 + operations: + - CREATE + - UPDATE + resources: + - federations + sideEffects: None + webhookPath: /validate-rabbitmq-com-v1beta1-federation + - type: ValidatingAdmissionWebhook + admissionReviewVersions: + - v1 + containerPort: 443 + targetPort: 9443 + deploymentName: messaging-topology-operator + failurePolicy: Fail + generateName: voperatorpolicy.kb.io + rules: + - apiGroups: + - rabbitmq.com + apiVersions: + - v1beta1 + operations: + - CREATE + - UPDATE + resources: + - operatorpolicies + sideEffects: None + webhookPath: /validate-rabbitmq-com-v1beta1-operatorpolicy + - type: ValidatingAdmissionWebhook + admissionReviewVersions: + - v1 + containerPort: 443 + targetPort: 9443 + deploymentName: messaging-topology-operator + failurePolicy: Fail + generateName: vpermission.kb.io + rules: + - apiGroups: + - rabbitmq.com + apiVersions: + - v1beta1 + operations: + - CREATE + - UPDATE + resources: + - permissions + sideEffects: None + webhookPath: /validate-rabbitmq-com-v1beta1-permission + - type: ValidatingAdmissionWebhook + admissionReviewVersions: + - v1 + containerPort: 443 + targetPort: 9443 + deploymentName: messaging-topology-operator + failurePolicy: Fail + generateName: vpolicy.kb.io + rules: + - apiGroups: + - rabbitmq.com + apiVersions: + - v1beta1 + operations: + - CREATE + - UPDATE + resources: + - policies + sideEffects: None + webhookPath: /validate-rabbitmq-com-v1beta1-policy + - type: ValidatingAdmissionWebhook + admissionReviewVersions: + - v1 + containerPort: 443 + targetPort: 9443 + deploymentName: messaging-topology-operator + failurePolicy: Fail + generateName: vqueue.kb.io + rules: + - apiGroups: + - rabbitmq.com + apiVersions: + - v1beta1 + operations: + - CREATE + - UPDATE + resources: + - queues + sideEffects: None + webhookPath: /validate-rabbitmq-com-v1beta1-queue + - type: ValidatingAdmissionWebhook + admissionReviewVersions: + - v1 + containerPort: 443 + targetPort: 9443 + deploymentName: messaging-topology-operator + failurePolicy: Fail + generateName: vschemareplication.kb.io + rules: + - apiGroups: + - rabbitmq.com + apiVersions: + - v1beta1 + operations: + - CREATE + - UPDATE + resources: + - schemareplications + sideEffects: None + webhookPath: /validate-rabbitmq-com-v1beta1-schemareplication + - type: ValidatingAdmissionWebhook + admissionReviewVersions: + - v1 + containerPort: 443 + targetPort: 9443 + deploymentName: messaging-topology-operator + failurePolicy: Fail + generateName: vshovel.kb.io + rules: + - apiGroups: + - rabbitmq.com + apiVersions: + - v1beta1 + operations: + - CREATE + - UPDATE + resources: + - shovels + sideEffects: None + webhookPath: /validate-rabbitmq-com-v1beta1-shovel + - type: ValidatingAdmissionWebhook + admissionReviewVersions: + - v1 + - v1beta1 + containerPort: 443 + targetPort: 9443 + deploymentName: messaging-topology-operator + failurePolicy: Fail + generateName: vtopicpermission.kb.io + rules: + - apiGroups: + - rabbitmq.com + apiVersions: + - v1beta1 + operations: + - CREATE + - UPDATE + resources: + - topicpermissions + sideEffects: None + webhookPath: /validate-rabbitmq-com-v1beta1-topicpermission + - type: ValidatingAdmissionWebhook + admissionReviewVersions: + - v1 + containerPort: 443 + targetPort: 9443 + deploymentName: messaging-topology-operator + failurePolicy: Fail + generateName: vuser.kb.io + rules: + - apiGroups: + - rabbitmq.com + apiVersions: + - v1beta1 + operations: + - CREATE + - UPDATE + resources: + - users + sideEffects: None + webhookPath: /validate-rabbitmq-com-v1beta1-user + - type: ValidatingAdmissionWebhook + admissionReviewVersions: + - v1 + containerPort: 443 + targetPort: 9443 + deploymentName: messaging-topology-operator + failurePolicy: Fail + generateName: vvhost.kb.io + rules: + - apiGroups: + - rabbitmq.com + apiVersions: + - v1beta1 + operations: + - CREATE + - UPDATE + resources: + - vhosts + sideEffects: None + webhookPath: /validate-rabbitmq-com-v1beta1-vhost + - type: ValidatingAdmissionWebhook + admissionReviewVersions: + - v1 + containerPort: 443 + targetPort: 9443 + deploymentName: messaging-topology-operator + failurePolicy: Fail + generateName: vsuperstream.kb.io + rules: + - apiGroups: + - rabbitmq.com + apiVersions: + - v1alpha1 + operations: + - CREATE + - UPDATE + resources: + - superstreams + sideEffects: None + webhookPath: /validate-rabbitmq-com-v1alpha1-superstream + installModes: + - type: OwnNamespace + supported: true + - type: SingleNamespace + supported: true + - type: MultiNamespace + supported: true + - type: AllNamespaces + supported: true diff --git a/olm/bundle/manifests/rabbitmq.com_binding.yml b/olm/bundle/manifests/rabbitmq.com_binding.yml new file mode 100644 index 00000000..ed3fe7aa --- /dev/null +++ b/olm/bundle/manifests/rabbitmq.com_binding.yml @@ -0,0 +1,140 @@ +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.17.1 + name: bindings.rabbitmq.com +spec: + group: rabbitmq.com + names: + categories: + - rabbitmq + kind: Binding + listKind: BindingList + plural: bindings + singular: binding + scope: Namespaced + versions: + - name: v1beta1 + schema: + openAPIV3Schema: + description: Binding is the Schema for the bindings API + properties: + apiVersion: + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + type: string + kind: + description: |- + Kind is a string value representing the REST resource this object represents. + Servers may infer this from the endpoint the client submits requests to. + Cannot be updated. + In CamelCase. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + type: string + metadata: + type: object + spec: + description: BindingSpec defines the desired state of Binding + properties: + arguments: + description: Cannot be updated + type: object + x-kubernetes-preserve-unknown-fields: true + destination: + description: Cannot be updated + type: string + destinationType: + description: Cannot be updated + enum: + - exchange + - queue + type: string + rabbitmqClusterReference: + description: |- + Reference to the RabbitmqCluster that the binding will be created in. + Required property. + properties: + connectionSecret: + description: |- + Secret contains the http management uri for the RabbitMQ cluster. + The Secret must contain the key `uri`, `username` and `password` or operator will error. + Have to set either name or connectionSecret, but not both. + properties: + name: + default: "" + description: |- + Name of the referent. + This field is effectively required, but due to backwards compatibility is + allowed to be empty. Instances of this type with an empty value here are + almost certainly wrong. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + type: string + type: object + x-kubernetes-map-type: atomic + name: + description: |- + The name of the RabbitMQ cluster to reference. + Have to set either name or connectionSecret, but not both. + type: string + namespace: + description: |- + The namespace of the RabbitMQ cluster to reference. + Defaults to the namespace of the requested resource if omitted. + type: string + type: object + routingKey: + description: Cannot be updated + type: string + source: + description: Cannot be updated + type: string + vhost: + default: / + description: Default to vhost '/'; cannot be updated + type: string + required: + - rabbitmqClusterReference + type: object + status: + description: BindingStatus defines the observed state of Binding + properties: + conditions: + items: + properties: + lastTransitionTime: + description: The last time this Condition status changed. + format: date-time + type: string + message: + description: Full text reason for current status of the condition. + type: string + reason: + description: One word, camel-case reason for current status of the condition. + type: string + status: + description: True, False, or Unknown + type: string + type: + description: Type indicates the scope of the custom resource status addressed by the condition. + type: string + required: + - status + - type + type: object + type: array + observedGeneration: + description: |- + observedGeneration is the most recent successful generation observed for this Binding. It corresponds to the + Binding's generation, which is updated on mutation by the API Server. + format: int64 + type: integer + type: object + type: object + served: true + storage: true + subresources: + status: {} diff --git a/olm/bundle/manifests/rabbitmq.com_exchange.yml b/olm/bundle/manifests/rabbitmq.com_exchange.yml new file mode 100644 index 00000000..8ca7bc96 --- /dev/null +++ b/olm/bundle/manifests/rabbitmq.com_exchange.yml @@ -0,0 +1,139 @@ +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.17.1 + name: exchanges.rabbitmq.com +spec: + group: rabbitmq.com + names: + categories: + - rabbitmq + kind: Exchange + listKind: ExchangeList + plural: exchanges + singular: exchange + scope: Namespaced + versions: + - name: v1beta1 + schema: + openAPIV3Schema: + description: Exchange is the Schema for the exchanges API + properties: + apiVersion: + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + type: string + kind: + description: |- + Kind is a string value representing the REST resource this object represents. + Servers may infer this from the endpoint the client submits requests to. + Cannot be updated. + In CamelCase. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + type: string + metadata: + type: object + spec: + description: ExchangeSpec defines the desired state of Exchange + properties: + arguments: + type: object + x-kubernetes-preserve-unknown-fields: true + autoDelete: + description: Cannot be updated + type: boolean + durable: + description: Cannot be updated + type: boolean + name: + description: Required property; cannot be updated + type: string + rabbitmqClusterReference: + description: |- + Reference to the RabbitmqCluster that the exchange will be created in. + Required property. + properties: + connectionSecret: + description: |- + Secret contains the http management uri for the RabbitMQ cluster. + The Secret must contain the key `uri`, `username` and `password` or operator will error. + Have to set either name or connectionSecret, but not both. + properties: + name: + default: "" + description: |- + Name of the referent. + This field is effectively required, but due to backwards compatibility is + allowed to be empty. Instances of this type with an empty value here are + almost certainly wrong. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + type: string + type: object + x-kubernetes-map-type: atomic + name: + description: |- + The name of the RabbitMQ cluster to reference. + Have to set either name or connectionSecret, but not both. + type: string + namespace: + description: |- + The namespace of the RabbitMQ cluster to reference. + Defaults to the namespace of the requested resource if omitted. + type: string + type: object + type: + default: direct + description: Cannot be updated + type: string + vhost: + default: / + description: Default to vhost '/'; cannot be updated + type: string + required: + - name + - rabbitmqClusterReference + type: object + status: + description: ExchangeStatus defines the observed state of Exchange + properties: + conditions: + items: + properties: + lastTransitionTime: + description: The last time this Condition status changed. + format: date-time + type: string + message: + description: Full text reason for current status of the condition. + type: string + reason: + description: One word, camel-case reason for current status of the condition. + type: string + status: + description: True, False, or Unknown + type: string + type: + description: Type indicates the scope of the custom resource status addressed by the condition. + type: string + required: + - status + - type + type: object + type: array + observedGeneration: + description: |- + observedGeneration is the most recent successful generation observed for this Exchange. It corresponds to the + Exchange's generation, which is updated on mutation by the API Server. + format: int64 + type: integer + type: object + type: object + served: true + storage: true + subresources: + status: {} diff --git a/olm/bundle/manifests/rabbitmq.com_federation.yml b/olm/bundle/manifests/rabbitmq.com_federation.yml new file mode 100644 index 00000000..2a8204ac --- /dev/null +++ b/olm/bundle/manifests/rabbitmq.com_federation.yml @@ -0,0 +1,199 @@ +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.17.1 + name: federations.rabbitmq.com +spec: + group: rabbitmq.com + names: + categories: + - rabbitmq + kind: Federation + listKind: FederationList + plural: federations + singular: federation + scope: Namespaced + versions: + - name: v1beta1 + schema: + openAPIV3Schema: + description: Federation is the Schema for the federations API + properties: + apiVersion: + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + type: string + kind: + description: |- + Kind is a string value representing the REST resource this object represents. + Servers may infer this from the endpoint the client submits requests to. + Cannot be updated. + In CamelCase. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + type: string + metadata: + type: object + spec: + description: |- + FederationSpec defines the desired state of Federation + For how to configure federation upstreams, see: https://www.rabbitmq.com/federation-reference.html. + properties: + ackMode: + enum: + - on-confirm + - on-publish + - no-ack + type: string + deletionPolicy: + default: delete + description: |- + DeletionPolicy defines the behavior of federation in the RabbitMQ cluster when the corresponding custom resource is deleted. + Can be set to 'delete' or 'retain'. Default is 'delete'. + enum: + - delete + - retain + type: string + exchange: + type: string + expires: + type: integer + maxHops: + type: integer + messageTTL: + type: integer + name: + description: Required property; cannot be updated + type: string + prefetch-count: + type: integer + queue: + type: string + queueType: + description: |- + The queue type of the internal upstream queue used by exchange federation. + Defaults to classic (a single replica queue type). Set to quorum to use a replicated queue type. + Changing the queue type will delete and recreate the upstream queue by default. + This may lead to messages getting lost or not routed anywhere during the re-declaration. + To avoid that, set resource-cleanup-mode key to never. + This requires manually deleting the old upstream queue so that it can be recreated with the new type. + enum: + - classic + - quorum + type: string + rabbitmqClusterReference: + description: |- + Reference to the RabbitmqCluster that this federation upstream will be created in. + Required property. + properties: + connectionSecret: + description: |- + Secret contains the http management uri for the RabbitMQ cluster. + The Secret must contain the key `uri`, `username` and `password` or operator will error. + Have to set either name or connectionSecret, but not both. + properties: + name: + default: "" + description: |- + Name of the referent. + This field is effectively required, but due to backwards compatibility is + allowed to be empty. Instances of this type with an empty value here are + almost certainly wrong. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + type: string + type: object + x-kubernetes-map-type: atomic + name: + description: |- + The name of the RabbitMQ cluster to reference. + Have to set either name or connectionSecret, but not both. + type: string + namespace: + description: |- + The namespace of the RabbitMQ cluster to reference. + Defaults to the namespace of the requested resource if omitted. + type: string + type: object + reconnectDelay: + type: integer + resourceCleanupMode: + description: |- + Whether to delete the internal upstream queue when federation links stop. + By default, the internal upstream queue is deleted immediately when a federation link stops. + Set to never to keep the upstream queue around and collect messages even when changing federation configuration. + enum: + - default + - never + type: string + trustUserId: + type: boolean + uriSecret: + description: |- + Secret contains the AMQP URI(s) for the upstream. + The Secret must contain the key `uri` or operator will error. + `uri` should be one or multiple uris separated by ','. + Required property. + properties: + name: + default: "" + description: |- + Name of the referent. + This field is effectively required, but due to backwards compatibility is + allowed to be empty. Instances of this type with an empty value here are + almost certainly wrong. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + type: string + type: object + x-kubernetes-map-type: atomic + vhost: + default: / + description: Default to vhost '/'; cannot be updated + type: string + required: + - name + - rabbitmqClusterReference + - uriSecret + type: object + status: + description: FederationStatus defines the observed state of Federation + properties: + conditions: + items: + properties: + lastTransitionTime: + description: The last time this Condition status changed. + format: date-time + type: string + message: + description: Full text reason for current status of the condition. + type: string + reason: + description: One word, camel-case reason for current status of the condition. + type: string + status: + description: True, False, or Unknown + type: string + type: + description: Type indicates the scope of the custom resource status addressed by the condition. + type: string + required: + - status + - type + type: object + type: array + observedGeneration: + description: |- + observedGeneration is the most recent successful generation observed for this Federation. It corresponds to the + Federation's generation, which is updated on mutation by the API Server. + format: int64 + type: integer + type: object + type: object + served: true + storage: true + subresources: + status: {} diff --git a/olm/bundle/manifests/rabbitmq.com_operatorpolicy.yml b/olm/bundle/manifests/rabbitmq.com_operatorpolicy.yml new file mode 100644 index 00000000..e3299472 --- /dev/null +++ b/olm/bundle/manifests/rabbitmq.com_operatorpolicy.yml @@ -0,0 +1,156 @@ +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.17.1 + name: operatorpolicies.rabbitmq.com +spec: + group: rabbitmq.com + names: + categories: + - rabbitmq + kind: OperatorPolicy + listKind: OperatorPolicyList + plural: operatorpolicies + singular: operatorpolicy + scope: Namespaced + versions: + - name: v1beta1 + schema: + openAPIV3Schema: + description: OperatorPolicy is the Schema for the operator policies API + properties: + apiVersion: + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + type: string + kind: + description: |- + Kind is a string value representing the REST resource this object represents. + Servers may infer this from the endpoint the client submits requests to. + Cannot be updated. + In CamelCase. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + type: string + metadata: + type: object + spec: + description: |- + OperatorPolicySpec defines the desired state of OperatorPolicy + https://www.rabbitmq.com/parameters.html#operator-policies + properties: + applyTo: + default: queues + description: |- + What this operator policy applies to: 'queues', 'classic_queues', 'quorum_queues', 'streams'. + Default to 'queues'. + enum: + - queues + - classic_queues + - quorum_queues + - streams + type: string + definition: + description: OperatorPolicy definition. Required property. + type: object + x-kubernetes-preserve-unknown-fields: true + name: + description: Required property; cannot be updated + type: string + pattern: + description: |- + Regular expression pattern used to match queues, e.g. "^my-queue$". + Required property. + type: string + priority: + default: 0 + description: |- + Default to '0'. + In the event that more than one operator policy can match a given queue, the operator policy with the greatest priority applies. + type: integer + rabbitmqClusterReference: + description: |- + Reference to the RabbitmqCluster that the operator policy will be created in. + Required property. + properties: + connectionSecret: + description: |- + Secret contains the http management uri for the RabbitMQ cluster. + The Secret must contain the key `uri`, `username` and `password` or operator will error. + Have to set either name or connectionSecret, but not both. + properties: + name: + default: "" + description: |- + Name of the referent. + This field is effectively required, but due to backwards compatibility is + allowed to be empty. Instances of this type with an empty value here are + almost certainly wrong. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + type: string + type: object + x-kubernetes-map-type: atomic + name: + description: |- + The name of the RabbitMQ cluster to reference. + Have to set either name or connectionSecret, but not both. + type: string + namespace: + description: |- + The namespace of the RabbitMQ cluster to reference. + Defaults to the namespace of the requested resource if omitted. + type: string + type: object + vhost: + default: / + description: Default to vhost '/'; cannot be updated + type: string + required: + - definition + - name + - pattern + - rabbitmqClusterReference + type: object + status: + description: OperatorPolicyStatus defines the observed state of OperatorPolicy + properties: + conditions: + items: + properties: + lastTransitionTime: + description: The last time this Condition status changed. + format: date-time + type: string + message: + description: Full text reason for current status of the condition. + type: string + reason: + description: One word, camel-case reason for current status of the condition. + type: string + status: + description: True, False, or Unknown + type: string + type: + description: Type indicates the scope of the custom resource status addressed by the condition. + type: string + required: + - status + - type + type: object + type: array + observedGeneration: + description: |- + observedGeneration is the most recent successful generation observed for this OperatorPolicy. It corresponds to the + OperatorPolicy's generation, which is updated on mutation by the API Server. + format: int64 + type: integer + type: object + type: object + served: true + storage: true + subresources: + status: {} diff --git a/olm/bundle/manifests/rabbitmq.com_permission.yml b/olm/bundle/manifests/rabbitmq.com_permission.yml new file mode 100644 index 00000000..33df4631 --- /dev/null +++ b/olm/bundle/manifests/rabbitmq.com_permission.yml @@ -0,0 +1,152 @@ +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.17.1 + name: permissions.rabbitmq.com +spec: + group: rabbitmq.com + names: + categories: + - rabbitmq + kind: Permission + listKind: PermissionList + plural: permissions + singular: permission + scope: Namespaced + versions: + - name: v1beta1 + schema: + openAPIV3Schema: + description: Permission is the Schema for the permissions API + properties: + apiVersion: + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + type: string + kind: + description: |- + Kind is a string value representing the REST resource this object represents. + Servers may infer this from the endpoint the client submits requests to. + Cannot be updated. + In CamelCase. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + type: string + metadata: + type: object + spec: + description: PermissionSpec defines the desired state of Permission + properties: + permissions: + description: |- + Permissions to grant to the user in the specific vhost; required property. + See RabbitMQ doc for more information: https://www.rabbitmq.com/access-control.html#user-management + properties: + configure: + type: string + read: + type: string + write: + type: string + type: object + rabbitmqClusterReference: + description: |- + Reference to the RabbitmqCluster that both the provided user and vhost are. + Required property. + properties: + connectionSecret: + description: |- + Secret contains the http management uri for the RabbitMQ cluster. + The Secret must contain the key `uri`, `username` and `password` or operator will error. + Have to set either name or connectionSecret, but not both. + properties: + name: + default: "" + description: |- + Name of the referent. + This field is effectively required, but due to backwards compatibility is + allowed to be empty. Instances of this type with an empty value here are + almost certainly wrong. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + type: string + type: object + x-kubernetes-map-type: atomic + name: + description: |- + The name of the RabbitMQ cluster to reference. + Have to set either name or connectionSecret, but not both. + type: string + namespace: + description: |- + The namespace of the RabbitMQ cluster to reference. + Defaults to the namespace of the requested resource if omitted. + type: string + type: object + user: + description: Name of an existing user; must provide user or userReference, else create/update will fail; cannot be updated + type: string + userReference: + description: Reference to an existing user.rabbitmq.com object; must provide user or userReference, else create/update will fail; cannot be updated + properties: + name: + default: "" + description: |- + Name of the referent. + This field is effectively required, but due to backwards compatibility is + allowed to be empty. Instances of this type with an empty value here are + almost certainly wrong. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + type: string + type: object + x-kubernetes-map-type: atomic + vhost: + description: Name of an existing vhost; required property; cannot be updated + type: string + required: + - permissions + - rabbitmqClusterReference + - vhost + type: object + status: + description: PermissionStatus defines the observed state of Permission + properties: + conditions: + items: + properties: + lastTransitionTime: + description: The last time this Condition status changed. + format: date-time + type: string + message: + description: Full text reason for current status of the condition. + type: string + reason: + description: One word, camel-case reason for current status of the condition. + type: string + status: + description: True, False, or Unknown + type: string + type: + description: Type indicates the scope of the custom resource status addressed by the condition. + type: string + required: + - status + - type + type: object + type: array + observedGeneration: + description: |- + observedGeneration is the most recent successful generation observed for this Permission. It corresponds to the + Permission's generation, which is updated on mutation by the API Server. + format: int64 + type: integer + type: object + type: object + served: true + storage: true + subresources: + status: {} diff --git a/olm/bundle/manifests/rabbitmq.com_policy.yml b/olm/bundle/manifests/rabbitmq.com_policy.yml new file mode 100644 index 00000000..fd4f9497 --- /dev/null +++ b/olm/bundle/manifests/rabbitmq.com_policy.yml @@ -0,0 +1,158 @@ +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.17.1 + name: policies.rabbitmq.com +spec: + group: rabbitmq.com + names: + categories: + - rabbitmq + kind: Policy + listKind: PolicyList + plural: policies + singular: policy + scope: Namespaced + versions: + - name: v1beta1 + schema: + openAPIV3Schema: + description: Policy is the Schema for the policies API + properties: + apiVersion: + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + type: string + kind: + description: |- + Kind is a string value representing the REST resource this object represents. + Servers may infer this from the endpoint the client submits requests to. + Cannot be updated. + In CamelCase. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + type: string + metadata: + type: object + spec: + description: |- + PolicySpec defines the desired state of Policy + https://www.rabbitmq.com/parameters.html#policies + properties: + applyTo: + default: all + description: |- + What this policy applies to: 'queues', 'classic_queues', 'quorum_queues', 'streams', 'exchanges', or 'all'. + Default to 'all'. + enum: + - queues + - classic_queues + - quorum_queues + - streams + - exchanges + - all + type: string + definition: + description: Policy definition. Required property. + type: object + x-kubernetes-preserve-unknown-fields: true + name: + description: Required property; cannot be updated + type: string + pattern: + description: |- + Regular expression pattern used to match queues and exchanges, e.g. "^amq.". + Required property. + type: string + priority: + default: 0 + description: |- + Default to '0'. + In the event that more than one policy can match a given exchange or queue, the policy with the greatest priority applies. + type: integer + rabbitmqClusterReference: + description: |- + Reference to the RabbitmqCluster that the policy will be created in. + Required property. + properties: + connectionSecret: + description: |- + Secret contains the http management uri for the RabbitMQ cluster. + The Secret must contain the key `uri`, `username` and `password` or operator will error. + Have to set either name or connectionSecret, but not both. + properties: + name: + default: "" + description: |- + Name of the referent. + This field is effectively required, but due to backwards compatibility is + allowed to be empty. Instances of this type with an empty value here are + almost certainly wrong. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + type: string + type: object + x-kubernetes-map-type: atomic + name: + description: |- + The name of the RabbitMQ cluster to reference. + Have to set either name or connectionSecret, but not both. + type: string + namespace: + description: |- + The namespace of the RabbitMQ cluster to reference. + Defaults to the namespace of the requested resource if omitted. + type: string + type: object + vhost: + default: / + description: Default to vhost '/'; cannot be updated + type: string + required: + - definition + - name + - pattern + - rabbitmqClusterReference + type: object + status: + description: PolicyStatus defines the observed state of Policy + properties: + conditions: + items: + properties: + lastTransitionTime: + description: The last time this Condition status changed. + format: date-time + type: string + message: + description: Full text reason for current status of the condition. + type: string + reason: + description: One word, camel-case reason for current status of the condition. + type: string + status: + description: True, False, or Unknown + type: string + type: + description: Type indicates the scope of the custom resource status addressed by the condition. + type: string + required: + - status + - type + type: object + type: array + observedGeneration: + description: |- + observedGeneration is the most recent successful generation observed for this Policy. It corresponds to the + Policy's generation, which is updated on mutation by the API Server. + format: int64 + type: integer + type: object + type: object + served: true + storage: true + subresources: + status: {} diff --git a/olm/bundle/manifests/rabbitmq.com_queue.yml b/olm/bundle/manifests/rabbitmq.com_queue.yml new file mode 100644 index 00000000..6056b58b --- /dev/null +++ b/olm/bundle/manifests/rabbitmq.com_queue.yml @@ -0,0 +1,155 @@ +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.17.1 + name: queues.rabbitmq.com +spec: + group: rabbitmq.com + names: + categories: + - rabbitmq + kind: Queue + listKind: QueueList + plural: queues + singular: queue + scope: Namespaced + versions: + - name: v1beta1 + schema: + openAPIV3Schema: + description: Queue is the Schema for the queues API + properties: + apiVersion: + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + type: string + kind: + description: |- + Kind is a string value representing the REST resource this object represents. + Servers may infer this from the endpoint the client submits requests to. + Cannot be updated. + In CamelCase. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + type: string + metadata: + type: object + spec: + description: QueueSpec defines the desired state of Queue + properties: + arguments: + description: |- + Queue arguments in the format of KEY: VALUE. e.g. x-delivery-limit: 10000. + Configuring queues through arguments is not recommended because they cannot be updated once set; we recommend configuring queues through policies instead. + type: object + x-kubernetes-preserve-unknown-fields: true + autoDelete: + description: when set to true, queues that have had at least one consumer before are deleted after the last consumer unsubscribes. + type: boolean + deleteIfEmpty: + description: when set to true, queues are deleted only if empty. + type: boolean + deleteIfUnused: + description: when set to true, queues are delete only if they have no consumer. + type: boolean + deletionPolicy: + default: delete + description: |- + DeletionPolicy defines the behavior of queue in the RabbitMQ cluster when the corresponding custom resource is deleted. + Can be set to 'delete' or 'retain'. Default is 'delete'. + enum: + - delete + - retain + type: string + durable: + description: When set to false queues does not survive server restart. + type: boolean + name: + description: Name of the queue; required property. + type: string + rabbitmqClusterReference: + description: |- + Reference to the RabbitmqCluster that the queue will be created in. + Required property. + properties: + connectionSecret: + description: |- + Secret contains the http management uri for the RabbitMQ cluster. + The Secret must contain the key `uri`, `username` and `password` or operator will error. + Have to set either name or connectionSecret, but not both. + properties: + name: + default: "" + description: |- + Name of the referent. + This field is effectively required, but due to backwards compatibility is + allowed to be empty. Instances of this type with an empty value here are + almost certainly wrong. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + type: string + type: object + x-kubernetes-map-type: atomic + name: + description: |- + The name of the RabbitMQ cluster to reference. + Have to set either name or connectionSecret, but not both. + type: string + namespace: + description: |- + The namespace of the RabbitMQ cluster to reference. + Defaults to the namespace of the requested resource if omitted. + type: string + type: object + type: + type: string + vhost: + default: / + description: Default to vhost '/' + type: string + required: + - name + - rabbitmqClusterReference + type: object + status: + description: QueueStatus defines the observed state of Queue + properties: + conditions: + items: + properties: + lastTransitionTime: + description: The last time this Condition status changed. + format: date-time + type: string + message: + description: Full text reason for current status of the condition. + type: string + reason: + description: One word, camel-case reason for current status of the condition. + type: string + status: + description: True, False, or Unknown + type: string + type: + description: Type indicates the scope of the custom resource status addressed by the condition. + type: string + required: + - status + - type + type: object + type: array + observedGeneration: + description: |- + observedGeneration is the most recent successful generation observed for this Queue. It corresponds to the + Queue's generation, which is updated on mutation by the API Server. + format: int64 + type: integer + type: object + type: object + served: true + storage: true + subresources: + status: {} diff --git a/olm/bundle/manifests/rabbitmq.com_schemareplication.yml b/olm/bundle/manifests/rabbitmq.com_schemareplication.yml new file mode 100644 index 00000000..7d7322d9 --- /dev/null +++ b/olm/bundle/manifests/rabbitmq.com_schemareplication.yml @@ -0,0 +1,155 @@ +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.17.1 + name: schemareplications.rabbitmq.com +spec: + group: rabbitmq.com + names: + kind: SchemaReplication + listKind: SchemaReplicationList + plural: schemareplications + singular: schemareplication + scope: Namespaced + versions: + - name: v1beta1 + schema: + openAPIV3Schema: + description: |- + SchemaReplication is the Schema for the schemareplications API + This feature requires Tanzu RabbitMQ with schema replication plugin. + For more information, see: https://tanzu.vmware.com/rabbitmq and https://www.rabbitmq.com/definitions-standby.html. + properties: + apiVersion: + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + type: string + kind: + description: |- + Kind is a string value representing the REST resource this object represents. + Servers may infer this from the endpoint the client submits requests to. + Cannot be updated. + In CamelCase. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + type: string + metadata: + type: object + spec: + description: SchemaReplicationSpec defines the desired state of SchemaReplication + properties: + endpoints: + description: |- + endpoints should be one or multiple endpoints separated by ','. + Must provide either spec.endpoints or endpoints in spec.upstreamSecret. + When endpoints are provided in both spec.endpoints and spec.upstreamSecret, spec.endpoints takes + precedence. + type: string + rabbitmqClusterReference: + description: Reference to the RabbitmqCluster that schema replication would be set for. Must be an existing cluster. + properties: + connectionSecret: + description: |- + Secret contains the http management uri for the RabbitMQ cluster. + The Secret must contain the key `uri`, `username` and `password` or operator will error. + Have to set either name or connectionSecret, but not both. + properties: + name: + default: "" + description: |- + Name of the referent. + This field is effectively required, but due to backwards compatibility is + allowed to be empty. Instances of this type with an empty value here are + almost certainly wrong. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + type: string + type: object + x-kubernetes-map-type: atomic + name: + description: |- + The name of the RabbitMQ cluster to reference. + Have to set either name or connectionSecret, but not both. + type: string + namespace: + description: |- + The namespace of the RabbitMQ cluster to reference. + Defaults to the namespace of the requested resource if omitted. + type: string + type: object + secretBackend: + description: Set to fetch user credentials from K8s external secret stores to be used for schema replication. + properties: + vault: + properties: + secretPath: + description: |- + Path in Vault to access a KV (Key-Value) secret with the fields username and password to be used for replication. + For example "secret/data/rabbitmq/config". + Optional; if not provided, username and password will come from upstreamSecret instead. + Have to set either secretBackend.vault.secretPath or upstreamSecret, but not both. + type: string + type: object + type: object + upstreamSecret: + description: |- + Defines a Secret which contains credentials to be used for schema replication. + The Secret must contain the keys `username` and `password` in its Data field, or operator will error. + Have to set either secretBackend.vault.secretPath or spec.upstreamSecret, but not both. + properties: + name: + default: "" + description: |- + Name of the referent. + This field is effectively required, but due to backwards compatibility is + allowed to be empty. Instances of this type with an empty value here are + almost certainly wrong. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + type: string + type: object + x-kubernetes-map-type: atomic + required: + - rabbitmqClusterReference + type: object + status: + description: SchemaReplicationStatus defines the observed state of SchemaReplication + properties: + conditions: + items: + properties: + lastTransitionTime: + description: The last time this Condition status changed. + format: date-time + type: string + message: + description: Full text reason for current status of the condition. + type: string + reason: + description: One word, camel-case reason for current status of the condition. + type: string + status: + description: True, False, or Unknown + type: string + type: + description: Type indicates the scope of the custom resource status addressed by the condition. + type: string + required: + - status + - type + type: object + type: array + observedGeneration: + description: |- + observedGeneration is the most recent successful generation observed for this Queue. It corresponds to the + Queue's generation, which is updated on mutation by the API Server. + format: int64 + type: integer + type: object + type: object + served: true + storage: true + subresources: + status: {} diff --git a/olm/bundle/manifests/rabbitmq.com_shovel.yml b/olm/bundle/manifests/rabbitmq.com_shovel.yml new file mode 100644 index 00000000..dcc6f0c1 --- /dev/null +++ b/olm/bundle/manifests/rabbitmq.com_shovel.yml @@ -0,0 +1,238 @@ +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.17.1 + name: shovels.rabbitmq.com +spec: + group: rabbitmq.com + names: + categories: + - rabbitmq + kind: Shovel + listKind: ShovelList + plural: shovels + singular: shovel + scope: Namespaced + versions: + - name: v1beta1 + schema: + openAPIV3Schema: + description: Shovel is the Schema for the shovels API + properties: + apiVersion: + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + type: string + kind: + description: |- + Kind is a string value representing the REST resource this object represents. + Servers may infer this from the endpoint the client submits requests to. + Cannot be updated. + In CamelCase. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + type: string + metadata: + type: object + spec: + description: |- + ShovelSpec defines the desired state of Shovel + For how to configure Shovel, see: https://www.rabbitmq.com/shovel.html. + properties: + ackMode: + enum: + - on-confirm + - on-publish + - no-ack + type: string + addForwardHeaders: + type: boolean + deleteAfter: + type: string + deletionPolicy: + default: delete + description: |- + DeletionPolicy defines the behavior of shovel in the RabbitMQ cluster when the corresponding custom resource is deleted. + Can be set to 'delete' or 'retain'. Default is 'delete'. + enum: + - delete + - retain + type: string + destAddForwardHeaders: + type: boolean + destAddTimestampHeader: + type: boolean + destAddress: + description: amqp10 configuration; required if destProtocol is amqp10 + type: string + destApplicationProperties: + description: amqp10 configuration + type: object + x-kubernetes-preserve-unknown-fields: true + destExchange: + description: amqp091 configuration + type: string + destExchangeKey: + description: amqp091 configuration + type: string + destMessageAnnotations: + description: amqp10 configuration + type: object + x-kubernetes-preserve-unknown-fields: true + destProperties: + description: amqp10 configuration + type: object + x-kubernetes-preserve-unknown-fields: true + destProtocol: + enum: + - amqp091 + - amqp10 + type: string + destPublishProperties: + description: amqp091 configuration + type: object + x-kubernetes-preserve-unknown-fields: true + destQueue: + description: amqp091 configuration + type: string + destQueueArgs: + type: object + x-kubernetes-preserve-unknown-fields: true + name: + description: Required property; cannot be updated + type: string + prefetchCount: + type: integer + rabbitmqClusterReference: + description: |- + Reference to the RabbitmqCluster that this Shovel will be created in. + Required property. + properties: + connectionSecret: + description: |- + Secret contains the http management uri for the RabbitMQ cluster. + The Secret must contain the key `uri`, `username` and `password` or operator will error. + Have to set either name or connectionSecret, but not both. + properties: + name: + default: "" + description: |- + Name of the referent. + This field is effectively required, but due to backwards compatibility is + allowed to be empty. Instances of this type with an empty value here are + almost certainly wrong. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + type: string + type: object + x-kubernetes-map-type: atomic + name: + description: |- + The name of the RabbitMQ cluster to reference. + Have to set either name or connectionSecret, but not both. + type: string + namespace: + description: |- + The namespace of the RabbitMQ cluster to reference. + Defaults to the namespace of the requested resource if omitted. + type: string + type: object + reconnectDelay: + type: integer + srcAddress: + description: amqp10 configuration; required if srcProtocol is amqp10 + type: string + srcConsumerArgs: + description: amqp091 configuration + type: object + x-kubernetes-preserve-unknown-fields: true + srcDeleteAfter: + type: string + srcExchange: + description: amqp091 configuration + type: string + srcExchangeKey: + description: amqp091 configuration + type: string + srcPrefetchCount: + type: integer + srcProtocol: + enum: + - amqp091 + - amqp10 + type: string + srcQueue: + description: amqp091 configuration + type: string + srcQueueArgs: + type: object + x-kubernetes-preserve-unknown-fields: true + uriSecret: + description: |- + Secret contains the AMQP URI(s) to configure Shovel destination and source. + The Secret must contain the key `destUri` and `srcUri` or operator will error. + Both fields should be one or multiple uris separated by ','. + Required property. + properties: + name: + default: "" + description: |- + Name of the referent. + This field is effectively required, but due to backwards compatibility is + allowed to be empty. Instances of this type with an empty value here are + almost certainly wrong. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + type: string + type: object + x-kubernetes-map-type: atomic + vhost: + default: / + description: Default to vhost '/'; cannot be updated + type: string + required: + - name + - rabbitmqClusterReference + - uriSecret + type: object + status: + description: ShovelStatus defines the observed state of Shovel + properties: + conditions: + items: + properties: + lastTransitionTime: + description: The last time this Condition status changed. + format: date-time + type: string + message: + description: Full text reason for current status of the condition. + type: string + reason: + description: One word, camel-case reason for current status of the condition. + type: string + status: + description: True, False, or Unknown + type: string + type: + description: Type indicates the scope of the custom resource status addressed by the condition. + type: string + required: + - status + - type + type: object + type: array + observedGeneration: + description: |- + observedGeneration is the most recent successful generation observed for this Shovel. It corresponds to the + Shovel's generation, which is updated on mutation by the API Server. + format: int64 + type: integer + type: object + type: object + served: true + storage: true + subresources: + status: {} diff --git a/olm/bundle/manifests/rabbitmq.com_superstream.yml b/olm/bundle/manifests/rabbitmq.com_superstream.yml new file mode 100644 index 00000000..c068cdd5 --- /dev/null +++ b/olm/bundle/manifests/rabbitmq.com_superstream.yml @@ -0,0 +1,144 @@ +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.17.1 + name: superstreams.rabbitmq.com +spec: + group: rabbitmq.com + names: + categories: + - rabbitmq + kind: SuperStream + listKind: SuperStreamList + plural: superstreams + singular: superstream + scope: Namespaced + versions: + - name: v1alpha1 + schema: + openAPIV3Schema: + description: SuperStream is the Schema for the queues API + properties: + apiVersion: + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + type: string + kind: + description: |- + Kind is a string value representing the REST resource this object represents. + Servers may infer this from the endpoint the client submits requests to. + Cannot be updated. + In CamelCase. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + type: string + metadata: + type: object + spec: + description: SuperStreamSpec defines the desired state of SuperStream + properties: + name: + description: Name of the queue; required property. + type: string + partitions: + default: 3 + description: |- + Number of partitions to create within this super stream. + Defaults to '3'. + type: integer + rabbitmqClusterReference: + description: |- + Reference to the RabbitmqCluster that the SuperStream will be created in. + Required property. + properties: + connectionSecret: + description: |- + Secret contains the http management uri for the RabbitMQ cluster. + The Secret must contain the key `uri`, `username` and `password` or operator will error. + Have to set either name or connectionSecret, but not both. + properties: + name: + default: "" + description: |- + Name of the referent. + This field is effectively required, but due to backwards compatibility is + allowed to be empty. Instances of this type with an empty value here are + almost certainly wrong. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + type: string + type: object + x-kubernetes-map-type: atomic + name: + description: |- + The name of the RabbitMQ cluster to reference. + Have to set either name or connectionSecret, but not both. + type: string + namespace: + description: |- + The namespace of the RabbitMQ cluster to reference. + Defaults to the namespace of the requested resource if omitted. + type: string + type: object + routingKeys: + description: |- + Routing keys to use for each of the partitions in the SuperStream + If unset, the routing keys for the partitions will be set to the index of the partitions + items: + type: string + type: array + vhost: + default: / + description: Default to vhost '/'; cannot be updated + type: string + required: + - name + - rabbitmqClusterReference + type: object + status: + description: SuperStreamStatus defines the observed state of SuperStream + properties: + conditions: + items: + properties: + lastTransitionTime: + description: The last time this Condition status changed. + format: date-time + type: string + message: + description: Full text reason for current status of the condition. + type: string + reason: + description: One word, camel-case reason for current status of the condition. + type: string + status: + description: True, False, or Unknown + type: string + type: + description: Type indicates the scope of the custom resource status addressed by the condition. + type: string + required: + - status + - type + type: object + type: array + observedGeneration: + description: |- + observedGeneration is the most recent successful generation observed for this SuperStream. It corresponds to the + SuperStream's generation, which is updated on mutation by the API Server. + format: int64 + type: integer + partitions: + description: Partitions are a list of the stream queue names which form the partitions of this SuperStream. + items: + type: string + type: array + type: object + type: object + served: true + storage: true + subresources: + status: {} diff --git a/olm/bundle/manifests/rabbitmq.com_topicpermission.yml b/olm/bundle/manifests/rabbitmq.com_topicpermission.yml new file mode 100644 index 00000000..f7c10434 --- /dev/null +++ b/olm/bundle/manifests/rabbitmq.com_topicpermission.yml @@ -0,0 +1,151 @@ +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.17.1 + name: topicpermissions.rabbitmq.com +spec: + group: rabbitmq.com + names: + kind: TopicPermission + listKind: TopicPermissionList + plural: topicpermissions + singular: topicpermission + scope: Namespaced + versions: + - name: v1beta1 + schema: + openAPIV3Schema: + description: TopicPermission is the Schema for the topicpermissions API + properties: + apiVersion: + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + type: string + kind: + description: |- + Kind is a string value representing the REST resource this object represents. + Servers may infer this from the endpoint the client submits requests to. + Cannot be updated. + In CamelCase. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + type: string + metadata: + type: object + spec: + description: TopicPermissionSpec defines the desired state of TopicPermission + properties: + permissions: + description: Permissions to grant to the user to a topic exchange; required property. + properties: + exchange: + description: Name of a topic exchange; required property; cannot be updated. + type: string + read: + type: string + write: + type: string + required: + - exchange + type: object + rabbitmqClusterReference: + description: |- + Reference to the RabbitmqCluster that both the provided user and vhost are. + Required property. + properties: + connectionSecret: + description: |- + Secret contains the http management uri for the RabbitMQ cluster. + The Secret must contain the key `uri`, `username` and `password` or operator will error. + Have to set either name or connectionSecret, but not both. + properties: + name: + default: "" + description: |- + Name of the referent. + This field is effectively required, but due to backwards compatibility is + allowed to be empty. Instances of this type with an empty value here are + almost certainly wrong. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + type: string + type: object + x-kubernetes-map-type: atomic + name: + description: |- + The name of the RabbitMQ cluster to reference. + Have to set either name or connectionSecret, but not both. + type: string + namespace: + description: |- + The namespace of the RabbitMQ cluster to reference. + Defaults to the namespace of the requested resource if omitted. + type: string + type: object + user: + description: Name of an existing user; must provide user or userReference, else create/update will fail; cannot be updated. + type: string + userReference: + description: Reference to an existing user.rabbitmq.com object; must provide user or userReference, else create/update will fail; cannot be updated. + properties: + name: + default: "" + description: |- + Name of the referent. + This field is effectively required, but due to backwards compatibility is + allowed to be empty. Instances of this type with an empty value here are + almost certainly wrong. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + type: string + type: object + x-kubernetes-map-type: atomic + vhost: + description: Name of an existing vhost; required property; cannot be updated. + type: string + required: + - permissions + - rabbitmqClusterReference + - vhost + type: object + status: + description: TopicPermissionStatus defines the observed state of TopicPermission + properties: + conditions: + items: + properties: + lastTransitionTime: + description: The last time this Condition status changed. + format: date-time + type: string + message: + description: Full text reason for current status of the condition. + type: string + reason: + description: One word, camel-case reason for current status of the condition. + type: string + status: + description: True, False, or Unknown + type: string + type: + description: Type indicates the scope of the custom resource status addressed by the condition. + type: string + required: + - status + - type + type: object + type: array + observedGeneration: + description: |- + observedGeneration is the most recent successful generation observed for this TopicPermission. It corresponds to the + TopicPermission's generation, which is updated on mutation by the API Server. + format: int64 + type: integer + type: object + type: object + served: true + storage: true + subresources: + status: {} diff --git a/olm/bundle/manifests/rabbitmq.com_user.yml b/olm/bundle/manifests/rabbitmq.com_user.yml new file mode 100644 index 00000000..6cdbd5d2 --- /dev/null +++ b/olm/bundle/manifests/rabbitmq.com_user.yml @@ -0,0 +1,194 @@ +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.17.1 + name: users.rabbitmq.com +spec: + group: rabbitmq.com + names: + categories: + - rabbitmq + kind: User + listKind: UserList + plural: users + singular: user + scope: Namespaced + versions: + - name: v1beta1 + schema: + openAPIV3Schema: + description: User is the Schema for the users API. + properties: + apiVersion: + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + type: string + kind: + description: |- + Kind is a string value representing the REST resource this object represents. + Servers may infer this from the endpoint the client submits requests to. + Cannot be updated. + In CamelCase. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + type: string + metadata: + type: object + spec: + description: Spec configures the desired state of the User object. + properties: + importCredentialsSecret: + description: |- + Defines a Secret containing the credentials for the User. If this field is omitted, random a username and + password will be generated. The Secret must have the following keys in its Data field: + + * `username` – Must be present or the import will fail. + * `passwordHash` – The SHA-512 hash of the password. If the hash is an empty string, a passwordless user + will be created. For more information, see https://www.rabbitmq.com/docs/passwords. + * `password` – Plain-text password. Will be used only if the `passwordHash` key is missing. + + Note that this import only occurs at creation time, and is ignored once a password has been set on a User. + properties: + name: + default: "" + description: |- + Name of the referent. + This field is effectively required, but due to backwards compatibility is + allowed to be empty. Instances of this type with an empty value here are + almost certainly wrong. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + type: string + type: object + x-kubernetes-map-type: atomic + limits: + description: |- + Limits to apply to a user to restrict the number of connections and channels + the user can create. These limits can be used as guard rails in environments + where applications cannot be trusted and monitored in detail, for example, + when RabbitMQ clusters are offered as a service. See https://www.rabbitmq.com/docs/user-limits. + properties: + channels: + description: Limits how many AMQP 0.9.1 channels the user can open. + format: int32 + type: integer + connections: + description: Limits how many connections the user can open. + format: int32 + type: integer + type: object + rabbitmqClusterReference: + description: |- + Reference to the RabbitmqCluster that the user will be created for. This cluster must + exist for the User object to be created. + properties: + connectionSecret: + description: |- + Secret contains the http management uri for the RabbitMQ cluster. + The Secret must contain the key `uri`, `username` and `password` or operator will error. + Have to set either name or connectionSecret, but not both. + properties: + name: + default: "" + description: |- + Name of the referent. + This field is effectively required, but due to backwards compatibility is + allowed to be empty. Instances of this type with an empty value here are + almost certainly wrong. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + type: string + type: object + x-kubernetes-map-type: atomic + name: + description: |- + The name of the RabbitMQ cluster to reference. + Have to set either name or connectionSecret, but not both. + type: string + namespace: + description: |- + The namespace of the RabbitMQ cluster to reference. + Defaults to the namespace of the requested resource if omitted. + type: string + type: object + tags: + description: |- + List of permissions tags to associate with the user. This determines the level of + access to the RabbitMQ management UI granted to the user. Omitting this field will + lead to a user than can still connect to the cluster through messaging protocols, + but cannot perform any management actions. + For more information, see https://www.rabbitmq.com/management.html#permissions. + items: + description: |- + UserTag defines the level of access to the management UI allocated to the user. + For more information, see https://www.rabbitmq.com/management.html#permissions. + enum: + - management + - policymaker + - monitoring + - administrator + type: string + type: array + required: + - rabbitmqClusterReference + type: object + status: + description: Status exposes the observed state of the User object. + properties: + conditions: + items: + properties: + lastTransitionTime: + description: The last time this Condition status changed. + format: date-time + type: string + message: + description: Full text reason for current status of the condition. + type: string + reason: + description: One word, camel-case reason for current status of the condition. + type: string + status: + description: True, False, or Unknown + type: string + type: + description: Type indicates the scope of the custom resource status addressed by the condition. + type: string + required: + - status + - type + type: object + type: array + credentials: + description: Provides a reference to a Secret object containing the user credentials. + properties: + name: + default: "" + description: |- + Name of the referent. + This field is effectively required, but due to backwards compatibility is + allowed to be empty. Instances of this type with an empty value here are + almost certainly wrong. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + type: string + type: object + x-kubernetes-map-type: atomic + observedGeneration: + description: |- + observedGeneration is the most recent successful generation observed for this User. It corresponds to the + User's generation, which is updated on mutation by the API Server. + format: int64 + type: integer + username: + description: Provide rabbitmq Username + type: string + required: + - username + type: object + type: object + served: true + storage: true + subresources: + status: {} diff --git a/olm/bundle/manifests/rabbitmq.com_vhost.yml b/olm/bundle/manifests/rabbitmq.com_vhost.yml new file mode 100644 index 00000000..f86cb1d7 --- /dev/null +++ b/olm/bundle/manifests/rabbitmq.com_vhost.yml @@ -0,0 +1,159 @@ +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.17.1 + name: vhosts.rabbitmq.com +spec: + group: rabbitmq.com + names: + categories: + - rabbitmq + kind: Vhost + listKind: VhostList + plural: vhosts + singular: vhost + scope: Namespaced + versions: + - name: v1beta1 + schema: + openAPIV3Schema: + description: Vhost is the Schema for the vhosts API + properties: + apiVersion: + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + type: string + kind: + description: |- + Kind is a string value representing the REST resource this object represents. + Servers may infer this from the endpoint the client submits requests to. + Cannot be updated. + In CamelCase. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + type: string + metadata: + type: object + spec: + description: VhostSpec defines the desired state of Vhost + properties: + defaultQueueType: + description: |- + Default queue type for this vhost; can be set to quorum, classic or stream. + Supported in RabbitMQ 3.11.12 or above. + enum: + - quorum + - classic + - stream + type: string + deletionPolicy: + default: delete + description: |- + DeletionPolicy defines the behavior of vhost in the RabbitMQ cluster when the corresponding custom resource is deleted. + Can be set to 'delete' or 'retain'. Default is 'delete'. + enum: + - delete + - retain + type: string + limits: + description: |- + Limits defines limits to be applied to the vhost. + Supported limits include max-connections and max-queues. + See https://www.rabbitmq.com/docs/vhosts#limits + properties: + connections: + format: int32 + type: integer + queues: + format: int32 + type: integer + type: object + name: + description: Name of the vhost; see https://www.rabbitmq.com/vhosts.html. + type: string + rabbitmqClusterReference: + description: |- + Reference to the RabbitmqCluster that the vhost will be created in. + Required property. + properties: + connectionSecret: + description: |- + Secret contains the http management uri for the RabbitMQ cluster. + The Secret must contain the key `uri`, `username` and `password` or operator will error. + Have to set either name or connectionSecret, but not both. + properties: + name: + default: "" + description: |- + Name of the referent. + This field is effectively required, but due to backwards compatibility is + allowed to be empty. Instances of this type with an empty value here are + almost certainly wrong. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + type: string + type: object + x-kubernetes-map-type: atomic + name: + description: |- + The name of the RabbitMQ cluster to reference. + Have to set either name or connectionSecret, but not both. + type: string + namespace: + description: |- + The namespace of the RabbitMQ cluster to reference. + Defaults to the namespace of the requested resource if omitted. + type: string + type: object + tags: + items: + type: string + type: array + tracing: + type: boolean + required: + - name + - rabbitmqClusterReference + type: object + status: + description: VhostStatus defines the observed state of Vhost + properties: + conditions: + items: + properties: + lastTransitionTime: + description: The last time this Condition status changed. + format: date-time + type: string + message: + description: Full text reason for current status of the condition. + type: string + reason: + description: One word, camel-case reason for current status of the condition. + type: string + status: + description: True, False, or Unknown + type: string + type: + description: Type indicates the scope of the custom resource status addressed by the condition. + type: string + required: + - status + - type + type: object + type: array + observedGeneration: + description: |- + observedGeneration is the most recent successful generation observed for this Vhost. It corresponds to the + Vhost's generation, which is updated on mutation by the API Server. + format: int64 + type: integer + type: object + type: object + served: true + storage: true + subresources: + status: {} diff --git a/olm/catalog/cool-catalog/rabbitmq-cluster-operator/catalog.yaml b/olm/catalog/cool-catalog/rabbitmq-cluster-operator/catalog.yaml new file mode 100644 index 00000000..0be4893e --- /dev/null +++ b/olm/catalog/cool-catalog/rabbitmq-cluster-operator/catalog.yaml @@ -0,0 +1,32 @@ +defaultChannel: preview +description: | + This is a test bundle for CI +icon: + base64data: iVBORw0KGgoAAAANSUhEUgAAALQAAAC0CAYAAAA9zQYyAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAABmJLR0QAAAAAAAD5Q7t/AAAF6UlEQVR42u3dT6hcZxmA8eekkcaGGpqKsd1IG5WWUhMRJIvaFi2FKhY19g+FpF20H11Uri6sdCNFcGNXDV2duEipuMqiIaiFeqXrIBpFlLpwZUChtYWqaaH0c3EncDOZM/dc773zzvf2+UHI5czNfO93eOZkZhYzHSPUQgd8ETgG3A3cNubfbdIfgFeBnwO/7/odWGGLauFTwNeAh4FDwMe2eYkLwB+Bk8Cvu553ovfcmm6jX6iFw8AvgRsWONefgKNdz1+Dzsv0OdgDPAc8teClC3ByGR/cy2pu0LVwFDgdON9Xup7fBK5PLewH/gwcCBrhp0DpemrkeWjFrqEbauHzxMYMsFoLn45avBZ2A6vExQzwOPBM4PpNmRl0LewCXokebuKlWsLWfgQ4HH0CgB/Xws3RQ7Rg6Ap9BPhE9HDrZrll0YtOHtQvRm9+nR9GD9CCoaC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/V0QMA10cPMMSg23MwegDgy9EDDDHo9hyPXLwWdgNPRp+EIQbdnpVauC5w/a9Gn4B5DLpNz0csWgv7gDPRm5/HoNt0rBa+s8gFJ59E+lr0xjdi0O06UQs/qYU9O71QLdwMvA4cjt70Rma+p1kLNXowbcpjwC+ANyefbLRlkxd/B1l7Afjd6A0O6frLG/bzoXM4demHWvgX8O8t3t8BluP97k0z6Hz2T/58KPkcWqkYtFIxaKVi0ErFoJWKQSsVg1YqBq1UDFqpGLRSMWilYtBKxaCVikErFYNWKgatVAxaqRi0UjFopWLQSsWglYpBKxWDVioGrVQMWqkYtFIxaKVi0ErFoJXKUNDnoweTRjg/fWAo6FPRk0ojnJo+MBT06ehJpRGu6HRm0F3PBeDZ6GmlOZ6ddHqZeS8Kf4RXai2n06z1eYXBoCdfPvMgsBI9vbTOCvDg0Jcj/Q8PqOSYg4f+VAAAACV0RVh0ZGF0ZTpjcmVhdGUAMjAyMy0wMy0zMVQxMTo1Mzo1NCswMDowMA0WgssAAAAldEVYdGRhdGU6bW9kaWZ5ADIwMjMtMDMtMzFUMTE6NTM6NTQrMDA6MDB8Szp3AAAAVXRFWHRzdmc6Y29tbWVudAAgVXBsb2FkZWQgdG86IFNWRyBSZXBvLCB3d3cuc3ZncmVwby5jb20sIEdlbmVyYXRvcjogU1ZHIFJlcG8gTWl4ZXIgVG9vbHMgRQdcEwAAAABJRU5ErkJggg== + mediatype: image/png +name: rabbitmq-cluster-operator +schema: olm.package +--- +image: quay.io/rabbitmqoperator/rabbitmq-for-kubernetes-olm-cluster-operator:2.15.0 +name: rabbitmq-cluster-operator.v2.15.0 +package: rabbitmq-cluster-operator +properties: +- type: olm.gvk + value: + group: rabbitmq.com + kind: RabbitmqCluster + version: v1beta1 +- type: olm.package + value: + packageName: rabbitmq-cluster-operator + version: 2.15.0 +relatedImages: +- image: quay.io/rabbitmqoperator/cluster-operator:latest + name: "" +schema: olm.bundle +--- +schema: olm.channel +package: rabbitmq-cluster-operator +name: preview +entries: +- name: rabbitmq-cluster-operator.v2.15.0 diff --git a/olm/catalog/cool-catalog/rabbitmq-messaging-topology-operator/catalog.yaml b/olm/catalog/cool-catalog/rabbitmq-messaging-topology-operator/catalog.yaml new file mode 100644 index 00000000..5a9d0002 --- /dev/null +++ b/olm/catalog/cool-catalog/rabbitmq-messaging-topology-operator/catalog.yaml @@ -0,0 +1,234 @@ +defaultChannel: preview +description: | + This is a test bundle for CI +icon: + base64data: iVBORw0KGgoAAAANSUhEUgAAALQAAAC0CAYAAAA9zQYyAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAABmJLR0QAAAAAAAD5Q7t/AAAF6UlEQVR42u3dT6hcZxmA8eekkcaGGpqKsd1IG5WWUhMRJIvaFi2FKhY19g+FpF20H11Uri6sdCNFcGNXDV2duEipuMqiIaiFeqXrIBpFlLpwZUChtYWqaaH0c3EncDOZM/dc773zzvf2+UHI5czNfO93eOZkZhYzHSPUQgd8ETgG3A3cNubfbdIfgFeBnwO/7/odWGGLauFTwNeAh4FDwMe2eYkLwB+Bk8Cvu553ovfcmm6jX6iFw8AvgRsWONefgKNdz1+Dzsv0OdgDPAc8teClC3ByGR/cy2pu0LVwFDgdON9Xup7fBK5PLewH/gwcCBrhp0DpemrkeWjFrqEbauHzxMYMsFoLn45avBZ2A6vExQzwOPBM4PpNmRl0LewCXokebuKlWsLWfgQ4HH0CgB/Xws3RQ7Rg6Ap9BPhE9HDrZrll0YtOHtQvRm9+nR9GD9CCoaCPRw825VsBa34metNTHq2Fj0QPseyGgr4nerApdwSseVP0pme4NnqAZTcU9MHowabcGrDmjdGbnsGgN7Br63exEL5lpVEMWqkYtFIxaKVi0ErFoJWKQSsVg1YqBq1UDFqpGLRSMWil0krQ0iitBO0VWqMYtFIxaKVi0ErFoJWKQSsVg1YqBq1UDFqptBK0NEorQXuF1igGrVQMWqkYtFIxaKVi0ErFoJVKK0FLo7QStFdojWLQ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FIxaKVi0ErFoJWKQSsVg1YqBq1UDFqpGLRSMWilYtBKxaCVikErFYNWKgatVAxaqRi0UjFopWLQSsWglYpBKxWDVioGrVQMWqkYtFIxaKVi0ErFoJXKUNDnoweTRjg/fWAo6FPRk0ojnJo+MBT06ehJpRGu6HRm0F3PBeDZ6GmlOZ6ddHqZeS8Kf4RXai2n06z1eYXBoCdfPvMgsBI9vbTOCvDg0Jcj/Q8PqOSYg4f+VAAAACV0RVh0ZGF0ZTpjcmVhdGUAMjAyMy0wMy0zMVQxMTo1Mzo1NCswMDowMA0WgssAAAAldEVYdGRhdGU6bW9kaWZ5ADIwMjMtMDMtMzFUMTE6NTM6NTQrMDA6MDB8Szp3AAAAVXRFWHRzdmc6Y29tbWVudAAgVXBsb2FkZWQgdG86IFNWRyBSZXBvLCB3d3cuc3ZncmVwby5jb20sIEdlbmVyYXRvcjogU1ZHIFJlcG8gTWl4ZXIgVG9vbHMgRQdcEwAAAABJRU5ErkJggg== + mediatype: image/png +name: rabbitmq-messaging-topology-operator +schema: olm.package +--- +schema: olm.channel +package: rabbitmq-messaging-topology-operator +name: preview +entries: +- name: rabbitmq-messaging-topology-operator.v0.0.0 +--- +image: quay.io/zerpet/topology-operator-bundle:latest +name: rabbitmq-messaging-topology-operator.v0.0.0 +package: rabbitmq-messaging-topology-operator +properties: +- type: olm.gvk + value: + group: rabbitmq.com + kind: Binding + version: v1beta1 +- type: olm.gvk + value: + group: rabbitmq.com + kind: Exchange + version: v1beta1 +- type: olm.gvk + value: + group: rabbitmq.com + kind: Federation + version: v1beta1 +- type: olm.gvk + value: + group: rabbitmq.com + kind: OperatorPolicy + version: v1beta1 +- type: olm.gvk + value: + group: rabbitmq.com + kind: Permission + version: v1beta1 +- type: olm.gvk + value: + group: rabbitmq.com + kind: Policy + version: v1beta1 +- type: olm.gvk + value: + group: rabbitmq.com + kind: Queue + version: v1beta1 +- type: olm.gvk + value: + group: rabbitmq.com + kind: SchemaReplication + version: v1beta1 +- type: olm.gvk + value: + group: rabbitmq.com + kind: Shovel + version: v1beta1 +- type: olm.gvk + value: + group: rabbitmq.com + kind: SuperStream + version: v1alpha1 +- type: olm.gvk + value: + group: rabbitmq.com + kind: TopicPermission + version: v1beta1 +- type: olm.gvk + value: + group: rabbitmq.com + kind: User + version: v1beta1 +- type: olm.gvk + value: + group: rabbitmq.com + kind: Vhost + version: v1beta1 +- type: olm.gvk.required + value: + group: rabbitmq.com + kind: RabbitmqCluster + version: v1beta1 +- type: olm.package + value: + packageName: rabbitmq-messaging-topology-operator + version: 0.0.1 +- type: olm.package.required + value: + packageName: rabbitmq-cluster-operator + versionRange: '>2.0.0' +- type: olm.csv.metadata + value: + annotations: + alm-examples: | + [{"apiVersion":"rabbitmq.com/v1beta1","kind":"Binding","metadata":{"name":"test"},"spec":{"rabbitmqClusterReference":{"name":"rabbitmq-cluster"}}},{"apiVersion":"rabbitmq.com/v1beta1","kind":"Exchange","metadata":{"name":"test"},"spec":{"rabbitmqClusterReference":{"name":"rabbitmq-cluster"}}},{"apiVersion":"rabbitmq.com/v1beta1","kind":"Federation","metadata":{"name":"test"},"spec":{"rabbitmqClusterReference":{"name":"rabbitmq-cluster"}}},{"apiVersion":"rabbitmq.com/v1beta1","kind":"Permission","metadata":{"name":"test"},"spec":{"rabbitmqClusterReference":{"name":"rabbitmq-cluster"}}},{"apiVersion":"rabbitmq.com/v1beta1","kind":"Policy","metadata":{"name":"test"},"spec":{"rabbitmqClusterReference":{"name":"rabbitmq-cluster"}}},{"apiVersion":"rabbitmq.com/v1beta1","kind":"OperatorPolicy","metadata":{"name":"test"},"spec":{"rabbitmqClusterReference":{"name":"rabbitmq-cluster"}}},{"apiVersion":"rabbitmq.com/v1beta1","kind":"Queue","metadata":{"name":"test"},"spec":{"rabbitmqClusterReference":{"name":"rabbitmq-cluster"}}},{"apiVersion":"rabbitmq.com/v1beta1","kind":"SchemaReplication","metadata":{"name":"test"},"spec":{"rabbitmqClusterReference":{"name":"rabbitmq-cluster"}}},{"apiVersion":"rabbitmq.com/v1beta1","kind":"Shovel","metadata":{"name":"test"},"spec":{"rabbitmqClusterReference":{"name":"rabbitmq-cluster"}}},{"apiVersion":"rabbitmq.com/v1alpha1","kind":"SuperStream","metadata":{"name":"test"},"spec":{"rabbitmqClusterReference":{"name":"rabbitmq-cluster"}}},{"apiVersion":"rabbitmq.com/v1beta1","kind":"User","metadata":{"name":"test"},"spec":{"rabbitmqClusterReference":{"name":"rabbitmq-cluster"}}},{"apiVersion":"rabbitmq.com/v1beta1","kind":"Vhost","metadata":{"name":"test"},"spec":{"rabbitmqClusterReference":{"name":"rabbitmq-cluster"}}},{"apiVersion":"rabbitmq.com/v1beta1","kind":"TopicPermission","metadata":{"name":"test"},"spec":{"rabbitmqClusterReference":{"name":"rabbitmq-cluster"}}}] + capabilities: Full Lifecycle + categories: Streaming & Messaging + certified: "false" + containerImage: quay.io/rabbitmqoperator/messaging-topology-operator:latest + createdAt: 2025-07-02T17:09:56 + description: Kubernetes operator to allow developers to create and manage RabbitMQ messaging topologies within a RabbitMQ cluster using a declarative Kubernetes API. + repository: https://github.com/rabbitmq/messaging-topology-operator + support: VMware Tanzu + apiServiceDefinitions: {} + crdDescriptions: + owned: + - description: Binding + displayName: Binding + kind: Binding + name: bindings.rabbitmq.com + version: v1beta1 + - description: Exchange + displayName: Exchange + kind: Exchange + name: exchanges.rabbitmq.com + version: v1beta1 + - description: Federation + displayName: Federation + kind: Federation + name: federations.rabbitmq.com + version: v1beta1 + - description: Permission + displayName: Permission + kind: Permission + name: permissions.rabbitmq.com + version: v1beta1 + - description: TopicPermission + displayName: TopicPermission + kind: TopicPermission + name: topicpermissions.rabbitmq.com + version: v1beta1 + - description: Policy + displayName: Policy + kind: Policy + name: policies.rabbitmq.com + version: v1beta1 + - description: OperatorPolicy + displayName: OperatorPolicy + kind: OperatorPolicy + name: operatorpolicies.rabbitmq.com + version: v1beta1 + - description: Queue + displayName: Queue + kind: Queue + name: queues.rabbitmq.com + version: v1beta1 + - description: Schema Replication + displayName: SchemaReplication + kind: SchemaReplication + name: schemareplications.rabbitmq.com + version: v1beta1 + - description: Shovel + displayName: Shovel + kind: Shovel + name: shovels.rabbitmq.com + version: v1beta1 + - description: Super Stream + displayName: SuperStream + kind: SuperStream + name: superstreams.rabbitmq.com + version: v1alpha1 + - description: User + displayName: User + kind: User + name: users.rabbitmq.com + version: v1beta1 + - description: Vhost + displayName: Vhost + kind: Vhost + name: vhosts.rabbitmq.com + version: v1beta1 + required: + - description: Rabbitmq Cluster + displayName: RabbitmqCluster + kind: RabbitmqCluster + name: rabbitmqclusters.rabbitmq.com + version: v1beta1 + description: | + ## About the managed application + RabbitMQ is an open-source message-broker software that originally implemented the Advanced Message Queuing Protocol and has since been extended with a plug-in architecture to support Streaming Text Oriented Messaging Protocol, MQ Telemetry Transport, and other protocols. + ## About this Operator + Kubernetes operator to allow developers to create and manage RabbitMQ messaging topologies within a RabbitMQ cluster using a declarative Kubernetes API. A Messaging topology is the collection of objects such as exchanges, queues, bindings and policies that provides specific messaging or streaming scenario. This operator is used with RabbitMQ clusters deployed via the RabbitMQ Cluster Kubernetes Operator. This repository contains custom controllers and custom resource definitions (CRDs) enabling a declarative API for RabbitMQ messaging topologies. + ## Prerequisites for enabling this Operator + The operator works on top of the RabbitMQ cluster operator. + Messaging Topology Operator is tested with the latest release of RabbitMQ Cluster Operator. It uses the generated default user secret from RabbitmqCluster (set in rabbitmqcluster.status.binding) to authenticate with RabbitMQ server. + displayName: rabbitmq-messaging-topology-operator + installModes: + - supported: true + type: OwnNamespace + - supported: true + type: SingleNamespace + - supported: true + type: MultiNamespace + - supported: true + type: AllNamespaces + keywords: + - rabbitmq + - messaging + - amqp + - amqp10 + - stomp + - mqtt + - mqtt5 + - queues + - streaming + links: + - name: GitHub + url: https://github.com/rabbitmq/messaging-topology-operator + - name: Documentation + url: https://www.rabbitmq.com/kubernetes/operator/install-topology-operator.html + maintainers: + - email: rabbitmq-users@googlegroups.com + name: VMware Tanzu + maturity: stable + nativeAPIs: + - group: "" + kind: Secret + version: v1 + - group: "" + kind: Service + version: v1 + provider: + name: VMware Tanzu +relatedImages: +- image: quay.io/zerpet/topology-operator-bundle:latest + name: "" +schema: olm.bundle From 21594ff984d0110f579243e89c1427693cabae53 Mon Sep 17 00:00:00 2001 From: Aitor Perez <1515757+Zerpet@users.noreply.github.com> Date: Mon, 30 Jun 2025 17:50:48 +0100 Subject: [PATCH 2/5] olm: refactor to bundle generation We are using a "generator" template and applying values on top, instead of using overlays to modify specific parts of the generator file. The Makefile is a new approach to script the commands, instead of using Python in the original OLM dedicated git repo. The future idea is to fold the OLM manifests repo into this one, for the specific bits of topology operator. --- .gitignore | 4 + Makefile | 3 +- olm/Makefile | 152 +++++++++++ olm/assets/catalog-source.yaml | 20 ++ olm/assets/operator-group.yaml | 19 ++ olm/assets/subscription.yaml | 16 ++ olm/bundle/bundle.Dockerfile | 11 + olm/bundle/metadata/annotations.yaml | 7 + olm/bundle/metadata/dependencies.yaml | 11 + olm/bundle/templates/overlay-remove-ns.yaml | 8 + ...ology-operator-namespace-scope-overlay.yml | 18 ++ ...gy-service-version-generator-openshift.yml | 246 ++++++++++++++++++ olm/catalog/cool-catalog.Dockerfile | 22 ++ .../templates/catalog-co-template.yaml | 36 +++ olm/catalog/templates/catalog-template.yaml | 239 +++++++++++++++++ 15 files changed, 811 insertions(+), 1 deletion(-) create mode 100644 olm/Makefile create mode 100644 olm/assets/catalog-source.yaml create mode 100644 olm/assets/operator-group.yaml create mode 100644 olm/assets/subscription.yaml create mode 100644 olm/bundle/bundle.Dockerfile create mode 100644 olm/bundle/metadata/annotations.yaml create mode 100644 olm/bundle/metadata/dependencies.yaml create mode 100644 olm/bundle/templates/overlay-remove-ns.yaml create mode 100644 olm/bundle/templates/topology-operator-namespace-scope-overlay.yml create mode 100644 olm/bundle/templates/topology-service-version-generator-openshift.yml create mode 100644 olm/catalog/cool-catalog.Dockerfile create mode 100644 olm/catalog/templates/catalog-co-template.yaml create mode 100644 olm/catalog/templates/catalog-template.yaml diff --git a/.gitignore b/.gitignore index 8fd44a6d..f9980adb 100644 --- a/.gitignore +++ b/.gitignore @@ -10,3 +10,7 @@ testbin/ bin/ tmp/ *.iml +## OLM +olm/bundle/crds +olm/bundle/manifests +olm/catalog/cool-catalog/ \ No newline at end of file diff --git a/Makefile b/Makefile index b8e576a0..af306e36 100644 --- a/Makefile +++ b/Makefile @@ -104,9 +104,10 @@ just-integration-tests: $(KUBEBUILDER_ASSETS) .PHONY: local-tests local-tests: unit-tests integration-tests ## Run all local tests (unit & integration) +SYSTEM_TEST_NS ?= rabbitmq-system .PHONY: system-tests system-tests: ## Run E2E tests using current context in ~/.kube/config. Expects cluster operator and topology operator to be installed in the cluster - NAMESPACE="rabbitmq-system" $(GINKGO) --randomize-all -r $(GINKGO_EXTRA) system_tests/ + NAMESPACE="$(SYSTEM_TEST_NS)" $(GINKGO) --randomize-all -r $(GINKGO_EXTRA) system_tests/ ################### diff --git a/olm/Makefile b/olm/Makefile new file mode 100644 index 00000000..3439fe18 --- /dev/null +++ b/olm/Makefile @@ -0,0 +1,152 @@ +SHELL = /bin/sh +PLATFORM := $(shell uname | tr A-Z a-z) +ARCHITECTURE := $(shell uname -m) +ifeq ($(ARCHITECTURE),x86_64) + ARCHITECTURE=amd64 +endif + +ifeq ($(ARCHITECTURE),aarch64) + ARCHITECTURE=arm64 +endif + +REPO_ROOT := $(shell git rev-parse --show-toplevel) + +.DEFAULT_GOAL := all + +.PHONY: help +help: ## Display this help. + @awk 'BEGIN {FS = ":.*##"; printf "\nUsage:\n make \033[36m\033[0m\n"} /^[a-zA-Z_0-9-]+:.*?##/ { printf " \033[36m%-15s\033[0m %s\n", $$1, $$2 } /^##@/ { printf "\n\033[1m%s\033[0m\n", substr($$0, 5) } ' $(MAKEFILE_LIST) + +###################### +## Bundle manifests ## +###################### + +.PHONY: all crds rbac deployment webhooks olm-manifests clean + +OLM_MANIFEST_DIR = $(REPO_ROOT)/olm/bundle/manifests +$(OLM_MANIFEST_DIR) : + mkdir -pv $@ + +TMP_DIR := $(REPO_ROOT)/tmp +$(TMP_DIR) : + mkdir -pv $@ + +$(TMP_DIR)/_all_manifests.yaml: $(TMP_DIR) + kustomize build $(REPO_ROOT)/config/installation/ > $(TMP_DIR)/_all_manifests.yaml + +crds: $(TMP_DIR)/_all_manifests.yaml $(TMP_DIR) + yq 'select(.kind == "CustomResourceDefinition")' -s '"rabbitmq.com_" + .spec.names.singular' $(TMP_DIR)/_all_manifests.yaml + mv -v $(CURDIR)/rabbitmq.com_*.y*ml $(REPO_ROOT)/olm/bundle/manifests/ + +rbac: $(OLM_TMP_DIR) ## Extract RBAC rules to a temporary file + yq '{"rules": .rules}' $(REPO_ROOT)/config/rbac/role.yaml > $(TMP_DIR)/role-rules.yaml + +QUAY_IO_OPERATOR_IMAGE ?= quay.io/rabbitmqoperator/messaging-topology-operator:latest +deployment: $(TMP_DIR)/_all_manifests.yaml $(TMP_DIR) ## Extract Deployment spec. Customise using QUAY_IO_OPERATOR_IMAGE + kustomize build $(REPO_ROOT)/config/installation/ | \ + ytt -f- -f $(REPO_ROOT)/config/ytt_overlays/change_deployment_image.yml \ + --data-value operator_image=$(QUAY_IO_OPERATOR_IMAGE) \ + -f $(REPO_ROOT)/olm/bundle/templates/topology-operator-namespace-scope-overlay.yml \ + > $(TMP_DIR)/topology-operator.yml + yq 'select(.kind =="Deployment") | {"spec": .spec}' $(TMP_DIR)/topology-operator.yml > $(TMP_DIR)/spec.yaml + +webhooks: $(TMP_DIR)/_all_manifests.yaml $(TMP_DIR) ## Extract Web-hook manifests into a temporary file + yq 'select(.kind =="ValidatingWebhookConfiguration") | {"webhooks": .webhooks}' $(TMP_DIR)/_all_manifests.yaml \ + > $(TMP_DIR)/_webhooks.yaml + +BUNDLE_CREATED_AT ?= $(shell date +'%Y-%m-%dT%H:%M:%S') +BUNDLE_VERSION ?= 0.0.0 +olm-manifests: $(OLM_MANIFEST_DIR) ## Render bundle manifests. Customise version using BUNDLE_VERSION and BUNDLE_CREATED_AT + ytt -f $(REPO_ROOT)/olm/bundle/templates/topology-service-version-generator-openshift.yml \ + --data-values-file $(TMP_DIR)/role-rules.yaml \ + --data-values-file $(TMP_DIR)/spec.yaml \ + --data-values-file $(TMP_DIR)/_webhooks.yaml \ + --data-value name="rabbitmq-messaging-topology-operator" \ + --data-value createdAt="$(BUNDLE_CREATED_AT)" \ + --data-value image="$(QUAY_IO_OPERATOR_IMAGE)" \ + --data-value version="$(BUNDLE_VERSION)" \ + --data-value replaces="$(BUNDLE_REPLACES)" \ + > $(OLM_MANIFEST_DIR)/rabbitmq-messaging-topology-operator.clusterserviceversion.yaml + +all::crds ## Default goal. Generates bundle manifests +all::rbac +all::deployment +all::webhooks +all::olm-manifests + +clean: + rm -f -v $(REPO_ROOT)/olm/bundle/manifests/*.y*ml + rm -f -v $(REPO_ROOT)/olm/bundle/crds/*.y*ml + +########### +## Build ## +########### + +CONTAINER ?= docker +REGISTRY ?= quay.io +IMAGE ?= rabbitmqoperator/rabbitmq-for-kubernetes-olm-messaging-topology-operator:latest +BUNDLE_IMAGE = $(REGISTRY)/$(IMAGE) + +.PHONY: docker-build docker-push +docker-build: ## Build bundle container. Customise using REGISTRY and IMAGE + $(CONTAINER) build -t $(BUNDLE_IMAGE) -f $(REPO_ROOT)/olm/bundle/bundle.Dockerfile $(REPO_ROOT)/olm/bundle + +docker-push: ## Push bundle container. Customise using REGISTRY and IMAGE + $(CONTAINER) push $(BUNDLE_IMAGE) + +############# +## Catalog ## +############# +# This is used in tests + +CATALOG_DIR = $(REPO_ROOT)/olm/catalog/cool-catalog/rabbitmq-messaging-topology-operator +$(CATALOG_DIR): + mkdir -p $@ + +CO_CATALOG_DIR = $(REPO_ROOT)/olm/catalog/cool-catalog/rabbitmq-cluster-operator +$(CO_CATALOG_DIR) : + mkdir -p $@ + +# Cluster Operator related variables +# Cluster Op is required here because it's a dependency of the top-op +CO_BUNDLE_NAME ?= rabbitmq-cluster-operator +CO_BUNDLE_VERSION ?= 2.15.0 +CO_BUNDLE_IMAGE ?= quay.io/rabbitmqoperator/rabbitmq-for-kubernetes-olm-cluster-operator:$(CO_BUNDLE_VERSION) +.PHONY: catalog-* +catalog-replace-bundle: $(CATALOG_DIR) ## Generate catalog manifest. Customise using BUNDLE_IMAGE and BUNDLE_VERSION + ytt -f $(REPO_ROOT)/olm/catalog/templates/catalog-template.yaml \ + --data-value name="rabbitmq-messaging-topology-operator" \ + --data-value image="$(BUNDLE_IMAGE)" \ + --data-value version="$(BUNDLE_VERSION)" \ + > $(CATALOG_DIR)/catalog.yaml + ytt -f $(REPO_ROOT)/olm/catalog/templates/catalog-co-template.yaml \ + --data-value cluster_operator_name="$(CO_BUNDLE_NAME)" \ + --data-value cluster_operator_version="$(CO_BUNDLE_VERSION)" \ + --data-value cluster_operator_image="$(CO_BUNDLE_IMAGE)" \ + > $(CO_CATALOG_DIR)/catalog.yaml + +CATALOG_IMAGE ?= rabbitmqoperator/test-catalog:latest-topology +catalog-build: ## Build catalog image. Customise using REGISTRY and CATALOG_IMAGE + $(CONTAINER) build -t $(REGISTRY)/$(CATALOG_IMAGE) --label "quay.expires-after=48h" -f $(REPO_ROOT)/olm/catalog/cool-catalog.Dockerfile $(REPO_ROOT)/olm/catalog + +catalog-push: ## Push catalog image. Customise using REGISTRY and CATALOG_IMAGE + $(CONTAINER) push $(REGISTRY)/$(CATALOG_IMAGE) + +catalog-deploy: ## Deploy a catalog source to an existing k8s + kubectl apply -f $(REPO_ROOT)/olm/assets/operator-group.yaml + ytt -f $(REPO_ROOT)/olm/assets/catalog-source.yaml --data-value image="$(REGISTRY)/$(CATALOG_IMAGE)" | kubectl apply -f- + kubectl apply -f $(REPO_ROOT)/olm/assets/subscription.yaml + +catalog-undeploy: ## Delete all catalog assets from k8s + kubectl delete -f $(REPO_ROOT)/olm/assets/subscription.yaml --ignore-not-found + kubectl delete -f $(REPO_ROOT)/olm/bundle/manifests/ --ignore-not-found + kubectl delete -f $(REPO_ROOT)/olm/assets/operator-group.yaml --ignore-not-found + ytt -f $(REPO_ROOT)/olm/assets/catalog-source.yaml --data-value image="$(REGISTRY)/$(CATALOG_IMAGE)" | kubectl delete -f- --ignore-not-found + +catalog-clean: ## Delete manifest files for catalog + rm -v -f $(REPO_ROOT)/olm/catalog/cool-catalog/*.y*ml + +catalog-all::catalog-replace-bundle +catalog-all::catalog-build +catalog-all::catalog-push +catalog-all::catalog-deploy diff --git a/olm/assets/catalog-source.yaml b/olm/assets/catalog-source.yaml new file mode 100644 index 00000000..15afcbdf --- /dev/null +++ b/olm/assets/catalog-source.yaml @@ -0,0 +1,20 @@ +#@ load("@ytt:data", "data") + +--- +apiVersion: operators.coreos.com/v1alpha1 +kind: CatalogSource +metadata: + name: cool-catalog + #! Subscriptions cannot install operators provided by CatalogSources + #! that are not in the same namespace unless the CatalogSource is + #! created in the olm namespace. + #! https://olm.operatorframework.io/docs/troubleshooting/subscription/#a-subscription-in-namespace-x-cant-install-operators-from-a-catalogsource-in-namespace-y + namespace: ns-1 +spec: + sourceType: grpc + image: #@ data.values.image + displayName: Test catalog + publisher: RabbitMQ Topology Operator Test + updateStrategy: + registryPoll: + interval: 10m diff --git a/olm/assets/operator-group.yaml b/olm/assets/operator-group.yaml new file mode 100644 index 00000000..9cd170fa --- /dev/null +++ b/olm/assets/operator-group.yaml @@ -0,0 +1,19 @@ +--- +apiVersion: v1 +kind: Namespace +metadata: + name: ns-1 +spec: {} +--- +apiVersion: operators.coreos.com/v1alpha2 +kind: OperatorGroup +metadata: + name: my-group + #! Subscriptions cannot install operators provided by CatalogSources + #! that are not in the same namespace unless the CatalogSource is + #! created in the olm namespace. + #! https://olm.operatorframework.io/docs/troubleshooting/subscription/#a-subscription-in-namespace-x-cant-install-operators-from-a-catalogsource-in-namespace-y + namespace: ns-1 +spec: + targetNamespaces: + - ns-1 diff --git a/olm/assets/subscription.yaml b/olm/assets/subscription.yaml new file mode 100644 index 00000000..6500ec91 --- /dev/null +++ b/olm/assets/subscription.yaml @@ -0,0 +1,16 @@ +--- +apiVersion: operators.coreos.com/v1alpha1 +kind: Subscription +metadata: + name: sub-to-rmq-messaging-topology-operator + #! Subscriptions cannot install operators provided by CatalogSources + #! that are not in the same namespace unless the CatalogSource is + #! created in the olm namespace. + #! https://olm.operatorframework.io/docs/troubleshooting/subscription/#a-subscription-in-namespace-x-cant-install-operators-from-a-catalogsource-in-namespace-y + namespace: ns-1 +spec: + channel: preview + name: rabbitmq-messaging-topology-operator + source: cool-catalog + sourceNamespace: ns-1 + installPlanApproval: Automatic diff --git a/olm/bundle/bundle.Dockerfile b/olm/bundle/bundle.Dockerfile new file mode 100644 index 00000000..23108780 --- /dev/null +++ b/olm/bundle/bundle.Dockerfile @@ -0,0 +1,11 @@ +FROM scratch + +LABEL operators.operatorframework.io.bundle.mediatype.v1=plain +LABEL operators.operatorframework.io.bundle.manifests.v1=manifests/ +LABEL operators.operatorframework.io.bundle.metadata.v1=metadata/ +LABEL operators.operatorframework.io.bundle.package.v1=rabbitmq-messaging-topology-operator +LABEL operators.operatorframework.io.bundle.channels.v1=stable +LABEL operators.operatorframework.io.bundle.channel.default.v1=stable + +COPY manifests /manifests/ +COPY metadata /metadata/ diff --git a/olm/bundle/metadata/annotations.yaml b/olm/bundle/metadata/annotations.yaml new file mode 100644 index 00000000..505256e7 --- /dev/null +++ b/olm/bundle/metadata/annotations.yaml @@ -0,0 +1,7 @@ +annotations: + operators.operatorframework.io.bundle.channel.default.v1: stable + operators.operatorframework.io.bundle.channels.v1: stable + operators.operatorframework.io.bundle.manifests.v1: manifests/ + operators.operatorframework.io.bundle.mediatype.v1: registry+v1 + operators.operatorframework.io.bundle.metadata.v1: metadata/ + operators.operatorframework.io.bundle.package.v1: rabbitmq-messaging-topology-operator diff --git a/olm/bundle/metadata/dependencies.yaml b/olm/bundle/metadata/dependencies.yaml new file mode 100644 index 00000000..2df24c19 --- /dev/null +++ b/olm/bundle/metadata/dependencies.yaml @@ -0,0 +1,11 @@ +--- +dependencies: + - type: olm.package + value: + packageName: rabbitmq-cluster-operator + version: ">2.0.0" + - type: olm.gvk + value: + group: rabbitmq.com + kind: RabbitmqCluster + version: v1beta1 diff --git a/olm/bundle/templates/overlay-remove-ns.yaml b/olm/bundle/templates/overlay-remove-ns.yaml new file mode 100644 index 00000000..b5ae9a04 --- /dev/null +++ b/olm/bundle/templates/overlay-remove-ns.yaml @@ -0,0 +1,8 @@ +#@ load("@ytt:overlay", "overlay") +#@ svc = overlay.subset({"kind": "Service"}) +#@ topology_operator = overlay.subset({"metadata": {"name": "messaging-topology-operator-webhook"}}) +#@overlay/match by=overlay.and_op(svc, topology_operator),expects=1 +--- +metadata: + #@overlay/remove + namespace: ns diff --git a/olm/bundle/templates/topology-operator-namespace-scope-overlay.yml b/olm/bundle/templates/topology-operator-namespace-scope-overlay.yml new file mode 100644 index 00000000..b853b1ff --- /dev/null +++ b/olm/bundle/templates/topology-operator-namespace-scope-overlay.yml @@ -0,0 +1,18 @@ +#@ load("@ytt:data", "data") +#@ load("@ytt:overlay", "overlay") +#@ deployment = overlay.subset({"kind": "Deployment"}) +#@ topology_operator = overlay.subset({"metadata": {"name": "messaging-topology-operator"}}) +#@overlay/match by=overlay.and_op(deployment, topology_operator),expects="1+" +--- +spec: + template: + spec: + containers: + #@overlay/match by=overlay.subset({"name": "manager"}),expects="1+" + - + #@overlay/match missing_ok=True + env: + - name: OPERATOR_SCOPE_NAMESPACE + valueFrom: + fieldRef: + fieldPath: metadata.annotations['olm.targetNamespaces'] diff --git a/olm/bundle/templates/topology-service-version-generator-openshift.yml b/olm/bundle/templates/topology-service-version-generator-openshift.yml new file mode 100644 index 00000000..2861b8da --- /dev/null +++ b/olm/bundle/templates/topology-service-version-generator-openshift.yml @@ -0,0 +1,246 @@ +#@ load("@ytt:data", "data") +#@ load("@ytt:library", "library") + +#@ def olm_validating_webhook(webhook): +type: ValidatingAdmissionWebhook +admissionReviewVersions: #@ webhook.admissionReviewVersions +containerPort: 443 +targetPort: 9443 +deploymentName: messaging-topology-operator +failurePolicy: #@ webhook.failurePolicy +generateName: #@ webhook.name +rules: #@ webhook.rules +sideEffects: None +webhookPath: #@ webhook.clientConfig.service.path +#@ end + +--- +apiVersion: operators.coreos.com/v1alpha1 +kind: ClusterServiceVersion +metadata: + name: #@ data.values.name + '.v' + data.values.version + namespace: placeholder + annotations: + #! TODO: examples with some values in spec + alm-examples: | + [{"apiVersion":"rabbitmq.com/v1beta1","kind":"Binding","metadata":{"name":"test"},"spec":{"rabbitmqClusterReference":{"name":"rabbitmq-cluster"}}},{"apiVersion":"rabbitmq.com/v1beta1","kind":"Exchange","metadata":{"name":"test"},"spec":{"rabbitmqClusterReference":{"name":"rabbitmq-cluster"}}},{"apiVersion":"rabbitmq.com/v1beta1","kind":"Federation","metadata":{"name":"test"},"spec":{"rabbitmqClusterReference":{"name":"rabbitmq-cluster"}}},{"apiVersion":"rabbitmq.com/v1beta1","kind":"Permission","metadata":{"name":"test"},"spec":{"rabbitmqClusterReference":{"name":"rabbitmq-cluster"}}},{"apiVersion":"rabbitmq.com/v1beta1","kind":"Policy","metadata":{"name":"test"},"spec":{"rabbitmqClusterReference":{"name":"rabbitmq-cluster"}}},{"apiVersion":"rabbitmq.com/v1beta1","kind":"OperatorPolicy","metadata":{"name":"test"},"spec":{"rabbitmqClusterReference":{"name":"rabbitmq-cluster"}}},{"apiVersion":"rabbitmq.com/v1beta1","kind":"Queue","metadata":{"name":"test"},"spec":{"rabbitmqClusterReference":{"name":"rabbitmq-cluster"}}},{"apiVersion":"rabbitmq.com/v1beta1","kind":"SchemaReplication","metadata":{"name":"test"},"spec":{"rabbitmqClusterReference":{"name":"rabbitmq-cluster"}}},{"apiVersion":"rabbitmq.com/v1beta1","kind":"Shovel","metadata":{"name":"test"},"spec":{"rabbitmqClusterReference":{"name":"rabbitmq-cluster"}}},{"apiVersion":"rabbitmq.com/v1alpha1","kind":"SuperStream","metadata":{"name":"test"},"spec":{"rabbitmqClusterReference":{"name":"rabbitmq-cluster"}}},{"apiVersion":"rabbitmq.com/v1beta1","kind":"User","metadata":{"name":"test"},"spec":{"rabbitmqClusterReference":{"name":"rabbitmq-cluster"}}},{"apiVersion":"rabbitmq.com/v1beta1","kind":"Vhost","metadata":{"name":"test"},"spec":{"rabbitmqClusterReference":{"name":"rabbitmq-cluster"}}},{"apiVersion":"rabbitmq.com/v1beta1","kind":"TopicPermission","metadata":{"name":"test"},"spec":{"rabbitmqClusterReference":{"name":"rabbitmq-cluster"}}}] + categories: Streaming & Messaging + certified: 'false' + createdAt: #@ data.values.createdAt + description: >- + Kubernetes operator to allow developers to create and manage RabbitMQ + messaging topologies within a RabbitMQ cluster using a declarative + Kubernetes API. + containerImage: #@ data.values.image + support: VMware Tanzu + capabilities: Full Lifecycle + repository: https://github.com/rabbitmq/messaging-topology-operator +spec: + displayName: rabbitmq-messaging-topology-operator + description: > + ## About the managed application + + RabbitMQ is an open-source message-broker software that originally + implemented the Advanced Message Queuing Protocol and has since been + extended with a plug-in architecture to support Streaming Text Oriented + Messaging Protocol, MQ Telemetry Transport, and other protocols. + + ## About this Operator + + Kubernetes operator to allow developers to create and manage RabbitMQ + messaging topologies within a RabbitMQ cluster using a declarative + Kubernetes API. A Messaging topology is the collection of objects such as + exchanges, queues, bindings and policies that provides specific messaging or + streaming scenario. This operator is used with RabbitMQ clusters deployed + via the RabbitMQ Cluster Kubernetes Operator. This repository contains + custom controllers and custom resource definitions (CRDs) enabling a + declarative API for RabbitMQ messaging topologies. + + ## Prerequisites for enabling this Operator + + The operator works on top of the RabbitMQ cluster operator. + + Messaging Topology Operator is tested with the latest release of RabbitMQ + Cluster Operator. It uses the generated default user secret from + RabbitmqCluster (set in rabbitmqcluster.status.binding) to authenticate with + RabbitMQ server. + maturity: stable + version: #@ data.values.version + support: Community based + keywords: + - rabbitmq + - messaging + - amqp + - amqp10 + - stomp + - mqtt + - mqtt5 + - queues + - streaming + maintainers: + - name: VMware Tanzu + email: rabbitmq-users@googlegroups.com + provider: + name: VMware Tanzu + labels: {} + selector: + matchLabels: {} + links: + - name: GitHub + url: https://github.com/rabbitmq/messaging-topology-operator + - name: Documentation + url: https://www.rabbitmq.com/kubernetes/operator/install-topology-operator.html + icon: + - base64data: iVBORw0KGgoAAAANSUhEUgAAAOQAAABACAYAAAAK2tt1AAAK4WlDQ1BJQ0MgUHJvZmlsZQAASImVlwdUk8kWgOf/00NCgIQqJfSOdAJICaEFUJAOohKSQEIJMSEoiA1ZXMFVQUQEywquiii4uhRZCyKKFcWGfUEWBeW5WLCB8n7gEXb3nffeeTdnMt+5uXPLnJmcOwCQQzhicTqsBECGKEsSHuBDj42Lp+OeAxwgAyJwBpYcrlTMDAsLAYjMzH+VD/cANDnftp709e+//1dR4fGlXACgBISTeFJuBsJtyBjhiiVZAKCOIXrD5VniSb6DME2CJIjw4CSnTPP4JCdNMVppyiYynIWwEQB4EocjSQGAZIvo6dncFMQPKQxhWxFPKEJ4LcKeXAGHhzASF1hlZGRO8jDCZoi9GAAyDWFG0p98pvzFf5LcP4eTIufpuqYE7yuUitM5Of/n1vxvyUiXzcQwQQZJIAkMR2YNZP/up2UGy1mUtCB0hoW8KfspFsgCo2aYK2XFzzCP4xssX5u+IGSGk4X+bLmfLHbkDPOlfhEzLMkMl8dKlrCYM8yRzMaVpUXJ9QI+W+4/VxAZM8PZwugFMyxNiwietWHJ9RJZuDx/vijAZzauv7z2DOmf6hWy5WuzBJGB8to5s/nzRcxZn9JYeW48vq/frE2U3F6c5SOPJU4Pk9vz0wPkeml2hHxtFnI4Z9eGyfcwlRMUNsPAF/iBEORDB1HAHjgCO+AKAgEri78ia7IYVqY4RyJMEWTRmciN49PZIq6NFd3e1t4egMn7O30k3oVP3UtI7cysLnM/cpQ/IHemZFaXVAZAcyES+uGszmgPAJQCAJrauTJJ9rQOPfmFQf4VKIAGNIEuMARmwBrJzxm4A28k4yAQCiJBHFgCuEAAMoAELAd5YB0oBMVgK9gOKsFeUAMOgaPgOGgGp8A5cBFcBTfBXfAI9IIB8AqMgA9gDII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CjzqtxU4/acHGVM6b9e90aWxIKrwlwQAAQL0KCAlSAKSkZApXH0opORCfdwd7kXKfoSEQ2qaFNK+d5tGBcXmUzzWr7Ja5zglI/rhlMAikdCGa6ZzdFq0EwP1UFEs9JOUxFOs0Hi2QUd8aR42R9RWHMhAD38daNfy/md6Fa/HdOb6ZSQck1FKmqNVypY4NGR4RAFPOxiBgQ/CkTi5cdqf04kPEJ51bGu93/9+1aqBjTMLmAUmC9imzmQKq5gF1reAEXL9e2AamAUmCxghJ1NYxSywvgWMkOvfA9PALDBZwAg5mcIqZoH1LWCEXP8emAZmgckCRsjJFFYxC6xvASPk+vfANDALTBYwQk6msIpZYH0LGCHXvwemgVlgsoARcjKFVcwC61vACLn+PTANzAKTBYyQkymsYhZY3wJGyPXvgWlgFpgsYIScTGEVs8D6FvgfHDmp0QzloI4AAAAASUVORK5CYII= + mediatype: image/png + + customresourcedefinitions: + owned: + - name: bindings.rabbitmq.com + displayName: Binding + kind: Binding + version: v1beta1 + description: Binding + - name: exchanges.rabbitmq.com + displayName: Exchange + kind: Exchange + version: v1beta1 + description: Exchange + - name: federations.rabbitmq.com + displayName: Federation + kind: Federation + version: v1beta1 + description: Federation + - name: permissions.rabbitmq.com + displayName: Permission + kind: Permission + version: v1beta1 + description: Permission + - name: topicpermissions.rabbitmq.com + displayName: TopicPermission + kind: TopicPermission + version: v1beta1 + description: TopicPermission + - name: policies.rabbitmq.com + displayName: Policy + kind: Policy + version: v1beta1 + description: Policy + - name: operatorpolicies.rabbitmq.com + displayName: OperatorPolicy + kind: OperatorPolicy + version: v1beta1 + description: OperatorPolicy + - name: queues.rabbitmq.com + displayName: Queue + kind: Queue + version: v1beta1 + description: Queue + - name: schemareplications.rabbitmq.com + displayName: SchemaReplication + kind: SchemaReplication + version: v1beta1 + description: Schema Replication + - name: shovels.rabbitmq.com + displayName: Shovel + kind: Shovel + version: v1beta1 + description: Shovel + - name: superstreams.rabbitmq.com + displayName: SuperStream + kind: SuperStream + version: v1alpha1 + description: Super Stream + - name: users.rabbitmq.com + displayName: User + kind: User + version: v1beta1 + description: User + - name: vhosts.rabbitmq.com + displayName: Vhost + kind: Vhost + version: v1beta1 + description: Vhost + required: + - name: rabbitmqclusters.rabbitmq.com + displayName: RabbitmqCluster + kind: RabbitmqCluster + version: v1beta1 + description: Rabbitmq Cluster + + nativeAPIs: + - version: v1 + group: "" + kind: Secret + - version: v1 + group: "" + kind: Service + + #@ if data.values.replaces != "": + replaces: #@ data.values.replaces + #@ end + + install: + strategy: deployment + spec: + #! TODO(Zerpet): generate the coordinator role from the YAML in config + permissions: + - serviceAccountName: messaging-topology-operator + rules: + - apiGroups: + - coordination.k8s.io + resources: + - leases + verbs: + - get + - list + - watch + - create + - update + - patch + - delete + - apiGroups: + - "" + resources: + - events + verbs: + - create + - apiGroups: + - "" + resources: + - configmaps + verbs: + - get + - list + - watch + - create + - update + - patch + - delete + + clusterPermissions: + - serviceAccountName: messaging-topology-operator + rules: #@ data.values.rules + + deployments: + - label: + app.kubernetes.io/component: rabbitmq-operator + app.kubernetes.io/name: messaging-topology-operator + app.kubernetes.io/part-of: rabbitmq + name: messaging-topology-operator + spec: #@ data.values.spec + + webhookdefinitions: + #@ for w in data.values.webhooks: + - #@ olm_validating_webhook(w) + #@ end + + installModes: + - type: OwnNamespace + supported: true + - type: SingleNamespace + supported: true + - type: MultiNamespace + supported: true + - type: AllNamespaces + supported: true diff --git a/olm/catalog/cool-catalog.Dockerfile b/olm/catalog/cool-catalog.Dockerfile new file mode 100644 index 00000000..78d6847c --- /dev/null +++ b/olm/catalog/cool-catalog.Dockerfile @@ -0,0 +1,22 @@ +# The builder image is expected to contain +# /bin/opm (with serve subcommand) +FROM quay.io/operator-framework/opm:latest AS builder + +# Copy FBC root into image at /configs and pre-populate serve cache +ADD cool-catalog /configs +RUN ["/bin/opm", "serve", "/configs", "--cache-dir=/tmp/cache", "--cache-only"] + +FROM quay.io/operator-framework/opm:latest +# The base image is expected to contain +# /bin/opm (with serve subcommand) and /bin/grpc_health_probe + +# Configure the entrypoint and command +ENTRYPOINT ["/bin/opm"] +CMD ["serve", "/configs", "--cache-dir=/tmp/cache"] + +COPY --from=builder /configs /configs +COPY --from=builder /tmp/cache /tmp/cache + +# Set FBC-specific label for the location of the FBC root directory +# in the image +LABEL operators.operatorframework.io.index.configs.v1=/configs diff --git a/olm/catalog/templates/catalog-co-template.yaml b/olm/catalog/templates/catalog-co-template.yaml new file mode 100644 index 00000000..4ff483b0 --- /dev/null +++ b/olm/catalog/templates/catalog-co-template.yaml @@ -0,0 +1,36 @@ +#@ load("@ytt:data", "data") + +#! Cluster operator package, must be here because it's a dependency of top-op +--- +defaultChannel: preview +description: | + This is a test bundle for CI +icon: + base64data: iVBORw0KGgoAAAANSUhEUgAAALQAAAC0CAYAAAA9zQYyAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAABmJLR0QAAAAAAAD5Q7t/AAAF6UlEQVR42u3dT6hcZxmA8eekkcaGGpqKsd1IG5WWUhMRJIvaFi2FKhY19g+FpF20H11Uri6sdCNFcGNXDV2duEipuMqiIaiFeqXrIBpFlLpwZUChtYWqaaH0c3EncDOZM/dc773zzvf2+UHI5czNfO93eOZkZhYzHSPUQgd8ETgG3A3cNubfbdIfgFeBnwO/7/odWGGLauFTwNeAh4FDwMe2eYkLwB+Bk8Cvu553ovfcmm6jX6iFw8AvgRsWONefgKNdz1+Dzsv0OdgDPAc8teClC3ByGR/cy2pu0LVwFDgdON9Xup7fBK5PLewH/gwcCBrhp0DpemrkeWjFrqEbauHzxMYMsFoLn45avBZ2A6vExQzwOPBM4PpNmRl0LewCXokebuKlWsLWfgQ4HH0CgB/Xws3RQ7Rg6Ap9BPhE9HDrZrll0YtOHtQvRm9+nR9GD9CCoaCPRw825VsBa34metNTHq2Fj0QPseyGgr4nerApdwSseVP0pme4NnqAZTcU9MHowabcGrDmjdGbnsGgN7Br63exEL5lpVEM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/HoNt0rBa+s8gFJ59E+lr0xjdi0O06UQs/qYU9O71QLdwMvA4cjt70Rma+p1kLNXowbcpjwC+ANyefbLRlkxd/B1l7Afjd6A0O6frLG/bzoXM4demHWvgX8O8t3t8BluP97k0z6Hz2T/58KPkcWqkYtFIxaKVi0ErFoJWKQSsVg1YqBq1UDFqpGLRSMWilYtBKxaCVikErFYNWKgatVAxaqRi0UjFopWLQSsWglYpBKxWDVioGrVQMWqkYtFIxaKVi0ErFoJXKUNDnoweTRjg/fWAo6FPRk0ojnJo+MBT06ehJpRGu6HRm0F3PBeDZ6GmlOZ6ddHqZeS8Kf4RXai2n06z1eYXBoCdfPvMgsBI9vbTOCvDg0Jcj/Q8PqOSYg4f+VAAAACV0RVh0ZGF0ZTpjcmVhdGUAMjAyMy0wMy0zMVQxMTo1Mzo1NCswMDowMA0WgssAAAAldEVYdGRhdGU6bW9kaWZ5ADIwMjMtMDMtMzFUMTE6NTM6NTQrMDA6MDB8Szp3AAAAVXRFWHRzdmc6Y29tbWVudAAgVXBsb2FkZWQgdG86IFNWRyBSZXBvLCB3d3cuc3ZncmVwby5jb20sIEdlbmVyYXRvcjogU1ZHIFJlcG8gTWl4ZXIgVG9vbHMgRQdcEwAAAABJRU5ErkJggg== + mediatype: image/png +name: rabbitmq-cluster-operator +schema: olm.package +--- +image: #@ data.values.cluster_operator_image +name: #@ "{}.v{}".format(data.values.cluster_operator_name, data.values.cluster_operator_version) +package: rabbitmq-cluster-operator +properties: + - type: olm.gvk + value: + group: rabbitmq.com + kind: RabbitmqCluster + version: v1beta1 + - type: olm.package + value: + packageName: #@ data.values.cluster_operator_name + version: #@ data.values.cluster_operator_version +relatedImages: + - image: quay.io/rabbitmqoperator/cluster-operator:latest + name: "" +schema: olm.bundle +--- +schema: olm.channel +package: rabbitmq-cluster-operator +name: preview +entries: + - name: #@ "{}.v{}".format(data.values.cluster_operator_name, data.values.cluster_operator_version) diff --git a/olm/catalog/templates/catalog-template.yaml b/olm/catalog/templates/catalog-template.yaml new file mode 100644 index 00000000..80e4fff7 --- /dev/null +++ b/olm/catalog/templates/catalog-template.yaml @@ -0,0 +1,239 @@ +#@ load("@ytt:data", "data") + +--- +defaultChannel: preview +description: | + This is a test bundle for CI +icon: + base64data: iVBORw0KGgoAAAANSUhEUgAAALQAAAC0CAYAAAA9zQYyAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAABmJLR0QAAAAAAAD5Q7t/AAAF6UlEQVR42u3dT6hcZxmA8eekkcaGGpqKsd1IG5WWUhMRJIvaFi2FKhY19g+FpF20H11Uri6sdCNFcGNXDV2duEipuMqiIaiFeqXrIBpFlLpwZUChtYWqaaH0c3EncDOZM/dc773zzvf2+UHI5czNfO93eOZkZhYzHSPUQgd8ETgG3A3cNubfbdIfgFeBnwO/7/odWGGLauFTwNeAh4FDwMe2eYkLwB+Bk8Cvu553ovfcmm6jX6iFw8AvgRsWONefgKNdz1+Dzsv0OdgDPAc8teClC3ByGR/cy2pu0LVwFDgdON9Xup7fBK5PLewH/gwcCBrhp0DpemrkeWjFrqEbauHzxMYMsFoLn45avBZ2A6vExQzwOPBM4PpNmRl0LewCXokebuKlWsLWfgQ4HH0CgB/Xws3RQ7Rg6Ap9BPhE9HDrZrll0YtOHtQvRm9+nR9GD9CCoaCPRw825VsBa34metNTHq2Fj0QPseyGgr4nerApdwSseVP0pme4NnqAZTcU9MHowabcGrDmjdGbnsGgN7Br63exEL5lpVEMWqkYtFIxaKVi0ErFoJWKQSsVg1YqBq1UDFqpGLRSMWil0krQ0iitBO0VWqMYtFIxaKVi0ErFoJWKQSsVg1YqBq1UDFqptBK0NEorQXuF1igGrVQMWqkYtFIxaKVi0ErFoJVKK0FLo7QStFdojWLQSsWglYpBKxWDVioGrVQMWqm0ErQ0SitBe4XWKAatVAxaqRi0UjFopdJK0NIorQTtFVqjGLRSMWilYtBKxaCVikErlVaClkZpJWiv0BrFoJWKQSs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ErFoJXKUNDnoweTRjg/fWAo6FPRk0ojnJo+MBT06ehJpRGu6HRm0F3PBeDZ6GmlOZ6ddHqZeS8Kf4RXai2n06z1eYXBoCdfPvMgsBI9vbTOCvDg0Jcj/Q8PqOSYg4f+VAAAACV0RVh0ZGF0ZTpjcmVhdGUAMjAyMy0wMy0zMVQxMTo1Mzo1NCswMDowMA0WgssAAAAldEVYdGRhdGU6bW9kaWZ5ADIwMjMtMDMtMzFUMTE6NTM6NTQrMDA6MDB8Szp3AAAAVXRFWHRzdmc6Y29tbWVudAAgVXBsb2FkZWQgdG86IFNWRyBSZXBvLCB3d3cuc3ZncmVwby5jb20sIEdlbmVyYXRvcjogU1ZHIFJlcG8gTWl4ZXIgVG9vbHMgRQdcEwAAAABJRU5ErkJggg== + mediatype: image/png +name: rabbitmq-messaging-topology-operator +schema: olm.package +--- +schema: olm.channel +package: rabbitmq-messaging-topology-operator +name: preview +entries: + - name: #@ "{}.v{}".format(data.values.name, data.values.version) +--- +image: #@ data.values.image +name: #@ "{}.v{}".format(data.values.name, data.values.version) +package: rabbitmq-messaging-topology-operator +properties: +- type: olm.gvk + value: + group: rabbitmq.com + kind: Binding + version: v1beta1 +- type: olm.gvk + value: + group: rabbitmq.com + kind: Exchange + version: v1beta1 +- type: olm.gvk + value: + group: rabbitmq.com + kind: Federation + version: v1beta1 +- type: olm.gvk + value: + group: rabbitmq.com + kind: OperatorPolicy + version: v1beta1 +- type: olm.gvk + value: + group: rabbitmq.com + kind: Permission + version: v1beta1 +- type: olm.gvk + value: + group: rabbitmq.com + kind: Policy + version: v1beta1 +- type: olm.gvk + value: + group: rabbitmq.com + kind: Queue + version: v1beta1 +- type: olm.gvk + value: + group: rabbitmq.com + kind: SchemaReplication + version: v1beta1 +- type: olm.gvk + value: + group: rabbitmq.com + kind: Shovel + version: v1beta1 +- type: olm.gvk + value: + group: rabbitmq.com + kind: SuperStream + version: v1alpha1 +- type: olm.gvk + value: + group: rabbitmq.com + kind: TopicPermission + version: v1beta1 +- type: olm.gvk + value: + group: rabbitmq.com + kind: User + version: v1beta1 +- type: olm.gvk + value: + group: rabbitmq.com + kind: Vhost + version: v1beta1 +- type: olm.gvk.required + value: + group: rabbitmq.com + kind: RabbitmqCluster + version: v1beta1 +- type: olm.package + value: + packageName: rabbitmq-messaging-topology-operator + version: 0.0.1 +- type: olm.package.required + value: + packageName: rabbitmq-cluster-operator + versionRange: '>2.0.0' +- type: olm.csv.metadata + value: + annotations: + alm-examples: | + [{"apiVersion":"rabbitmq.com/v1beta1","kind":"Binding","metadata":{"name":"test"},"spec":{"rabbitmqClusterReference":{"name":"rabbitmq-cluster"}}},{"apiVersion":"rabbitmq.com/v1beta1","kind":"Exchange","metadata":{"name":"test"},"spec":{"rabbitmqClusterReference":{"name":"rabbitmq-cluster"}}},{"apiVersion":"rabbitmq.com/v1beta1","kind":"Federation","metadata":{"name":"test"},"spec":{"rabbitmqClusterReference":{"name":"rabbitmq-cluster"}}},{"apiVersion":"rabbitmq.com/v1beta1","kind":"Permission","metadata":{"name":"test"},"spec":{"rabbitmqClusterReference":{"name":"rabbitmq-cluster"}}},{"apiVersion":"rabbitmq.com/v1beta1","kind":"Policy","metadata":{"name":"test"},"spec":{"rabbitmqClusterReference":{"name":"rabbitmq-cluster"}}},{"apiVersion":"rabbitmq.com/v1beta1","kind":"OperatorPolicy","metadata":{"name":"test"},"spec":{"rabbitmqClusterReference":{"name":"rabbitmq-cluster"}}},{"apiVersion":"rabbitmq.com/v1beta1","kind":"Queue","metadata":{"name":"test"},"spec":{"rabbitmqClusterReference":{"name":"rabbitmq-cluster"}}},{"apiVersion":"rabbitmq.com/v1beta1","kind":"SchemaReplication","metadata":{"name":"test"},"spec":{"rabbitmqClusterReference":{"name":"rabbitmq-cluster"}}},{"apiVersion":"rabbitmq.com/v1beta1","kind":"Shovel","metadata":{"name":"test"},"spec":{"rabbitmqClusterReference":{"name":"rabbitmq-cluster"}}},{"apiVersion":"rabbitmq.com/v1alpha1","kind":"SuperStream","metadata":{"name":"test"},"spec":{"rabbitmqClusterReference":{"name":"rabbitmq-cluster"}}},{"apiVersion":"rabbitmq.com/v1beta1","kind":"User","metadata":{"name":"test"},"spec":{"rabbitmqClusterReference":{"name":"rabbitmq-cluster"}}},{"apiVersion":"rabbitmq.com/v1beta1","kind":"Vhost","metadata":{"name":"test"},"spec":{"rabbitmqClusterReference":{"name":"rabbitmq-cluster"}}},{"apiVersion":"rabbitmq.com/v1beta1","kind":"TopicPermission","metadata":{"name":"test"},"spec":{"rabbitmqClusterReference":{"name":"rabbitmq-cluster"}}}] + capabilities: Full Lifecycle + categories: Streaming & Messaging + certified: "false" + containerImage: quay.io/rabbitmqoperator/messaging-topology-operator:latest + createdAt: 2025-07-02T17:09:56 + description: Kubernetes operator to allow developers to create and manage RabbitMQ + messaging topologies within a RabbitMQ cluster using a declarative Kubernetes + API. + repository: https://github.com/rabbitmq/messaging-topology-operator + support: VMware Tanzu + apiServiceDefinitions: {} + crdDescriptions: + owned: + - description: Binding + displayName: Binding + kind: Binding + name: bindings.rabbitmq.com + version: v1beta1 + - description: Exchange + displayName: Exchange + kind: Exchange + name: exchanges.rabbitmq.com + version: v1beta1 + - description: Federation + displayName: Federation + kind: Federation + name: federations.rabbitmq.com + version: v1beta1 + - description: Permission + displayName: Permission + kind: Permission + name: permissions.rabbitmq.com + version: v1beta1 + - description: TopicPermission + displayName: TopicPermission + kind: TopicPermission + name: topicpermissions.rabbitmq.com + version: v1beta1 + - description: Policy + displayName: Policy + kind: Policy + name: policies.rabbitmq.com + version: v1beta1 + - description: OperatorPolicy + displayName: OperatorPolicy + kind: OperatorPolicy + name: operatorpolicies.rabbitmq.com + version: v1beta1 + - description: Queue + displayName: Queue + kind: Queue + name: queues.rabbitmq.com + version: v1beta1 + - description: Schema Replication + displayName: SchemaReplication + kind: SchemaReplication + name: schemareplications.rabbitmq.com + version: v1beta1 + - description: Shovel + displayName: Shovel + kind: Shovel + name: shovels.rabbitmq.com + version: v1beta1 + - description: Super Stream + displayName: SuperStream + kind: SuperStream + name: superstreams.rabbitmq.com + version: v1alpha1 + - description: User + displayName: User + kind: User + name: users.rabbitmq.com + version: v1beta1 + - description: Vhost + displayName: Vhost + kind: Vhost + name: vhosts.rabbitmq.com + version: v1beta1 + required: + - description: Rabbitmq Cluster + displayName: RabbitmqCluster + kind: RabbitmqCluster + name: rabbitmqclusters.rabbitmq.com + version: v1beta1 + description: | + ## About the managed application + RabbitMQ is an open-source message-broker software that originally implemented the Advanced Message Queuing Protocol and has since been extended with a plug-in architecture to support Streaming Text Oriented Messaging Protocol, MQ Telemetry Transport, and other protocols. + ## About this Operator + Kubernetes operator to allow developers to create and manage RabbitMQ messaging topologies within a RabbitMQ cluster using a declarative Kubernetes API. A Messaging topology is the collection of objects such as exchanges, queues, bindings and policies that provides specific messaging or streaming scenario. This operator is used with RabbitMQ clusters deployed via the RabbitMQ Cluster Kubernetes Operator. This repository contains custom controllers and custom resource definitions (CRDs) enabling a declarative API for RabbitMQ messaging topologies. + ## Prerequisites for enabling this Operator + The operator works on top of the RabbitMQ cluster operator. + Messaging Topology Operator is tested with the latest release of RabbitMQ Cluster Operator. It uses the generated default user secret from RabbitmqCluster (set in rabbitmqcluster.status.binding) to authenticate with RabbitMQ server. + displayName: rabbitmq-messaging-topology-operator + installModes: + - supported: true + type: OwnNamespace + - supported: true + type: SingleNamespace + - supported: true + type: MultiNamespace + - supported: true + type: AllNamespaces + keywords: + - rabbitmq + - messaging + - amqp + - amqp10 + - stomp + - mqtt + - mqtt5 + - queues + - streaming + links: + - name: GitHub + url: https://github.com/rabbitmq/messaging-topology-operator + - name: Documentation + url: https://www.rabbitmq.com/kubernetes/operator/install-topology-operator.html + maintainers: + - email: rabbitmq-users@googlegroups.com + name: VMware Tanzu + maturity: stable + nativeAPIs: + - group: "" + kind: Secret + version: v1 + - group: "" + kind: Service + version: v1 + provider: + name: VMware Tanzu +relatedImages: +- image: #@ data.values.image + name: "" +schema: olm.bundle From ed12476b09ce8d732b62b3082856ef3c022d3ff7 Mon Sep 17 00:00:00 2001 From: Aitor Perez <1515757+Zerpet@users.noreply.github.com> Date: Mon, 7 Jul 2025 09:33:27 +0100 Subject: [PATCH 3/5] olm: refactor CI to new OLM generation --- .../testing-and-publishing-OLM-bundle.yml | 206 ++++++++---------- olm/Makefile | 13 +- scripts/print-previous-tag-version.bash | 11 + scripts/print-tag-version.bash | 5 + 4 files changed, 116 insertions(+), 119 deletions(-) create mode 100755 scripts/print-previous-tag-version.bash diff --git a/.github/workflows/testing-and-publishing-OLM-bundle.yml b/.github/workflows/testing-and-publishing-OLM-bundle.yml index 10df3f02..bce5c46b 100644 --- a/.github/workflows/testing-and-publishing-OLM-bundle.yml +++ b/.github/workflows/testing-and-publishing-OLM-bundle.yml @@ -1,5 +1,4 @@ -# action to test our operator lifecycle manager bundle -# See https://github.com/rabbitmq/OLM-Package-Repo for more info. +--- name: Test & Publish OLM bundle on: @@ -7,45 +6,49 @@ on: types: [published] workflow_dispatch: + inputs: + bundle_version: + description: version in format {major}.{minor}.{patch} (do not prefix with "v") + required: true + type: string + previous_version: + description: version N-1 in format v{major}.{minor}.{patch} (WITH prefix "v") + required: true + type: string + release: + default: false + type: boolean + required: false + description: Make a release PR to operatorhub? concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true -env: - # registry information where we want to store the operator image and the operator index image - DOCKER_REGISTRY_SERVER: quay.io/rabbitmqoperator - OLM_IMAGE: rabbitmq-for-kubernetes-olm-messaging-topology-operator - OLM_INDEX_IMAGE: rabbitmq-for-kubernetes-olm-messaging-topology-operator-index jobs: create-olm-package: name: Create the OLM Packaging runs-on: ubuntu-latest - permissions: - contents: 'write' - id-token: 'write' outputs: olm_package_version: ${{ steps.set_bundle_version.outputs.BUNDLE_VERSION }} + env: + REGISTRY: quay.io + steps: - name: Checkout code uses: actions/checkout@v4 - - name: Checkout OLM-Package-Repo - uses: actions/checkout@v4 - with: - repository: rabbitmq/OLM-Package-Repo - path: ./OLM-Package-Repo - - name: Set image tag to tagged release id: set_bundle_version - run: scripts/print-tag-version.bash >> "$GITHUB_OUTPUT" shell: bash + run: scripts/print-tag-version.bash ${{ inputs.bundle_version }} | tee -a "$GITHUB_OUTPUT" - - name: Install and configure Poetry - uses: snok/install-poetry@v1 - with: - virtualenvs-create: true - virtualenvs-in-project: false + - name: Set previous version + id: set_previous_version + shell: bash + env: + GH_TOKEN: ${{ github.token }} + run: scripts/print-previous-tag-version.bash ${{ inputs.previous_version }} | tee -a "$GITHUB_OUTPUT" - name: OpenShift Tools Installer uses: redhat-actions/openshift-tools-installer@v1 @@ -60,57 +63,44 @@ jobs: uses: carvel-dev/setup-action@v2.0.1 with: token: ${{ github.token }} - only: ytt, kbld + only: ytt - - name: Podman Login - uses: redhat-actions/podman-login@v1 + - name: Login to quay.io + uses: docker/login-action@v3 with: - registry: ${{ env.DOCKER_REGISTRY_SERVER }} + registry: ${{ env.REGISTRY }} + # secret_rabbitmq/kv/oss%2Frabbitmq-cluster-operator%2Fsecrets/details username: ${{ secrets.QUAY_USERNAME }} password: ${{ secrets.QUAY_ROBOT_TOKEN }} # TODO: Set auto-expiry in DEV images: https://idbs-engineering.com/containers/2019/08/27/auto-expiry-quayio-tags.html - - name: Create OLM package + - name: Create OLM bundle manifests env: - DOCKER_REGISTRY_SERVER: ${{ env.DOCKER_REGISTRY_SERVER }} - OLM_IMAGE: ${{ env.OLM_IMAGE }} - OLM_INDEX_IMAGE: ${{ env.OLM_INDEX_IMAGE }} + QUAY_IO_OPERATOR_IMAGE: quay.io/rabbitmqoperator/messaging-topology-operator:${{ steps.set_bundle_version.outputs.BUNDLE_VERSION }} BUNDLE_VERSION: ${{ steps.set_bundle_version.outputs.BUNDLE_VERSION }} - run: | - make generate-manifests - cp ./config/crd/bases/*.yaml ./OLM-Package-Repo/rabbitmq_olm_package_repo/manifests_crds_messaging_topology_operator/crds - cd ./OLM-Package-Repo - poetry run generate_bundle ./../releases/messaging-topology-operator-with-certmanager.yaml $BUNDLE_VERSION ./ - - opm alpha bundle build -c stable -d ./$BUNDLE_VERSION/manifests -t $DOCKER_REGISTRY_SERVER/$OLM_IMAGE:$BUNDLE_VERSION -p rabbitmq-messaging-topology-operator --image-builder podman - opm index add -b $DOCKER_REGISTRY_SERVER/$OLM_IMAGE:$BUNDLE_VERSION -t $DOCKER_REGISTRY_SERVER/$OLM_INDEX_IMAGE:$BUNDLE_VERSION -c podman - - mkdir upload - mv "$BUNDLE_VERSION" ./upload - cp ./rabbitmq_olm_package_repo/generators/messaging_topology_operator_generators/topology-service-version-generator-openshift.yml ./rabbitmq_olm_package_repo/generators/messaging_topology_operator_generators/topology-service-version-generator.yml - poetry run generate_bundle ./../releases/messaging-topology-operator-with-certmanager.yaml $BUNDLE_VERSION ./ - mv "$BUNDLE_VERSION" ./upload/$BUNDLE_VERSION-openshift - - - name: Push OLM Package to Registry - uses: redhat-actions/push-to-registry@v2 - with: - registry: ${{ env.DOCKER_REGISTRY_SERVER }} - image: ${{ env.OLM_IMAGE }} - tags: ${{ steps.set_bundle_version.outputs.BUNDLE_VERSION }} + BUNDLE_REPLACES: messaging-topology-operator.${{ steps.set_previous_version.outputs.PREVIOUS_VERSION }} + run: make -C olm/ all - - name: Push OLM Package to Registry - uses: redhat-actions/push-to-registry@v2 - with: - registry: ${{ env.DOCKER_REGISTRY_SERVER }} - image: ${{ env.OLM_INDEX_IMAGE }} - tags: ${{ steps.set_bundle_version.outputs.BUNDLE_VERSION }} + - name: Create OLM Package + env: + IMAGE: ${{ vars.UNTESTED_BUNDLE_IMAGE }}:${{ steps.set_bundle_version.outputs.BUNDLE_VERSION }} + run: make -C olm/ docker-build docker-push + + - name: Validate bundle manifests + env: + IMAGE: ${{ vars.UNTESTED_BUNDLE_IMAGE }}:${{ steps.set_bundle_version.outputs.BUNDLE_VERSION }} + run: opm alpha bundle validate --tag ${{ env.REGISTRY }}/${{ env.IMAGE }} --image-builder docker - name: upload-olm-package uses: actions/upload-artifact@v4 with: name: olm-artifact - path: OLM-Package-Repo/upload/ - retention-days: 2 + path: | + olm/bundle/manifests + olm/bundle/metadata + olm/bundle/bundle.Dockerfile + if-no-files-found: error + retention-days: 1 test-olm-package: name: Tests the OLM packaging @@ -123,77 +113,62 @@ jobs: - name: Checkout code uses: actions/checkout@v4 - - name: Checkout infrastructure repo - uses: actions/checkout@v4 - with: - repository: rabbitmq/infrastructure - token: ${{ secrets.GIT_HUB_ACCESS_INFRA_REPO_TOKEN }} - path: ./infrastructure - - - name: Checkout OLM-Package-Repo - uses: actions/checkout@v4 - with: - repository: rabbitmq/OLM-Package-Repo - path: ./OLM-Package-Repo - - name: Install Go uses: actions/setup-go@v5 with: go-version-file: "go.mod" - - name: Setup Ginkgo CLI - uses: ci-tasks/setup-ginkgo@main - - name: Install Carvel tooling uses: carvel-dev/setup-action@v2.0.1 with: token: ${{ github.token }} - only: ytt, kbld + only: ytt, imgpkg + + - name: Login to quay.io + uses: docker/login-action@v3 + with: + registry: quay.io + # secret_rabbitmq/kv/oss%2Frabbitmq-cluster-operator%2Fsecrets/details + username: ${{ secrets.QUAY_USERNAME }} + password: ${{ secrets.QUAY_ROBOT_TOKEN }} - - name: Protect access to the cluster with a mutex - uses: ben-z/gh-action-mutex@v1.0.0-alpha.10 + - name: Kind Cluster + uses: helm/kind-action@v1 with: - repo-token: ${{ secrets.CLUSTER_OPERATOR_ACCESS_TOKEN }} - repository: rabbitmq/cluster-operator - branch: openshift-lock + cluster_name: top-op-testing - - name: Connect to the Openshift cluster and deploy the operators through OLM - id: connect-and-deploy + - name: Install OLM + run: | + curl -L https://github.com/operator-framework/operator-lifecycle-manager/releases/download/v0.32.0/install.sh -o install.sh + chmod +x install.sh + ./install.sh v0.32.0 + + - name: Deploy test catalog env: - TOKEN: ${{ secrets.OPERATORHUB_TOKEN }} + IMAGE: ${{ vars.UNTESTED_BUNDLE_IMAGE }}:${{ needs.create-olm-package.outputs.olm_package_version }} BUNDLE_VERSION: ${{ needs.create-olm-package.outputs.olm_package_version }} - ENVIRONMENT: openshift - run: | - mkdir $HOME/.kube - cp ./infrastructure/k8s/okd/admin-kubeconfig.yaml $HOME/.kube/config - export KUBECONFIG=$HOME/.kube/config - kubectl config use-context admin - ./OLM-Package-Repo/testfiles/install-rabbitmq-messaging-topology-operator.sh $BUNDLE_VERSION + CATALOG_IMAGE: ${{ vars.TEST_CATALOG_IMAGE }} + run: make -C olm/ catalog-all - name: Run Operator System Tests env: ENVIRONMENT: "openshift" - K8S_OPERATOR_NAMESPACE: rabbitmq-system-olm - SYSTEM_TEST_NAMESPACE: rabbitmq-system-olm - NAMESPACE: rabbitmq-system-olm + K8S_OPERATOR_NAMESPACE: ns-1 + SYSTEM_TEST_NAMESPACE: ns-1 + NAMESPACE: ns-1 run: | kubectl wait -n "$K8S_OPERATOR_NAMESPACE" sub --all --for=jsonpath='{.status.state}'=AtLatestKnown --timeout=2m - ginkgo --randomize-all -r --skip "RabbitMQ Cluster with TLS enabled" system_tests/ + go run github.com/onsi/ginkgo/v2/ginkgo --randomize-all -r --skip "RabbitMQ Cluster with TLS enabled" system_tests/ - - name: Clean up - env: - OLM_INDEX_TAG: ${{ needs.create-olm-package.outputs.olm_package_version }} - if: ${{ !cancelled() && steps.connect-and-deploy.conclusion == 'success' }} - run: | - export KUBECONFIG=./infrastructure/k8s/okd/admin-kubeconfig.yaml - kubectl config use-context admin - ./OLM-Package-Repo/testfiles/uninstall-rabbitmq-messaging-topology-operator.sh $BUNDLE_VERSION + - name: Promote tested image + if: ${{ github.event_name == 'release' || inputs.release == true }} + run: imgpkg copy --image quay.io/${{ vars.UNTESTED_BUNDLE_IMAGE }}:${{ needs.create-olm-package.outputs.olm_package_version }} --to-repo quay.io/${{ vars.FINAL_BUNDLE_IMAGE }} publish-bundle-operatorhub: name: Create branch for OperatorHub PR runs-on: ubuntu-latest needs: test-olm-package - if: ${{ startsWith(github.ref, 'refs/tags/v') }} + if: ${{ github.event_name == 'release' || inputs.release == true }} steps: - name: Checkout community-operators fork (OperatorHub) uses: actions/checkout@v4 @@ -211,22 +186,24 @@ jobs: - name: Create branch for OperatorHub PR env: BUNDLE_VERSION: ${{ needs.test-olm-package.outputs.olm_package_version }} + GH_PROMPT_DISABLED: 1 + GH_TOKEN: ${{ secrets.RABBITMQ_CI_TOKEN }} run: | - mkdir -pv operators/rabbitmq-messaging-topology-operator git config user.name "rabbitmq-ci" git config user.email ${{ secrets.RABBITMQ_CI_EMAIL }} git branch rabbitmq-messaging-topology-operator-$BUNDLE_VERSION git checkout rabbitmq-messaging-topology-operator-$BUNDLE_VERSION - REPLACE_VERSION=$(ls -1v ./operators/rabbitmq-messaging-topology-operator/ | tail -2 | head -1) - - cp -v -fR ./olm-package-ci/"$BUNDLE_VERSION" ./operators/rabbitmq-messaging-topology-operator/ - sed -i -e "s/replaces: null/replaces: rabbitmq-messaging-topology-operator.v$REPLACE_VERSION/g" ./operators/rabbitmq-messaging-topology-operator/$BUNDLE_VERSION/manifests/rabbitmq.clusterserviceversion.yaml - sed -i -e "s/latest/$BUNDLE_VERSION/g" ./operators/rabbitmq-messaging-topology-operator/"$BUNDLE_VERSION"/manifests/rabbitmq.clusterserviceversion.yaml + mkdir -pv operators/rabbitmq-messaging-topology-operator/"$BUNDLE_VERSION" + cp -v -fR olm-package-ci/* ./operators/rabbitmq-messaging-topology-operator/"$BUNDLE_VERSION"/ git add operators/rabbitmq-messaging-topology-operator git commit -s -m "RabbitMQ Topology Operator release $BUNDLE_VERSION" git push --set-upstream origin "rabbitmq-messaging-topology-operator-$BUNDLE_VERSION" + gh pr create --title "operator messaging-topology-operator (${{ env.BUNDLE_VERSION }})" \ + --body "Update operator messaging-topology-operator (${{ needs.test-olm-package.outputs.olm_package_version }})" \ + --repo k8s-operatorhub/community-operators + publish-bundle-redhat-marketplace: name: Create branch for Openshift Marketplace PR runs-on: ubuntu-latest @@ -250,14 +227,17 @@ jobs: env: BUNDLE_VERSION: ${{ needs.test-olm-package.outputs.olm_package_version }} run: | - mkdir -pv operators/rabbitmq-messaging-topology-operator git config user.name "rabbitmq-ci" git config user.email ${{ secrets.RABBITMQ_CI_EMAIL }} git branch rabbitmq-messaging-topology-operator-$BUNDLE_VERSION git checkout rabbitmq-messaging-topology-operator-$BUNDLE_VERSION - cp -v -fR ./olm-package-ci/"$BUNDLE_VERSION-openshift" ./operators/rabbitmq-messaging-topology-operator/"$BUNDLE_VERSION" - sed -i -e "s/latest/$BUNDLE_VERSION/g" ./operators/rabbitmq-messaging-topology-operator/"$BUNDLE_VERSION"/manifests/rabbitmq.clusterserviceversion.yaml + mkdir -pv operators/rabbitmq-messaging-topology-operator/"$BUNDLE_VERSION" + cp -v -fR olm-package-ci/* ./operators/rabbitmq-messaging-topology-operator/"$BUNDLE_VERSION"/ git add operators/rabbitmq-messaging-topology-operator git commit -s -m "RabbitMQ Topology Operator release $BUNDLE_VERSION" git push --set-upstream origin "rabbitmq-messaging-topology-operator-$BUNDLE_VERSION" + + gh pr create --title "operator messaging-topology-operator (${{ env.BUNDLE_VERSION }})" \ + --body "Update operator messaging-topology-operator (${{ needs.test-olm-package.outputs.olm_package_version }})" \ + --repo k8s-operatorhub/community-operators-prod diff --git a/olm/Makefile b/olm/Makefile index 3439fe18..110a7bd3 100644 --- a/olm/Makefile +++ b/olm/Makefile @@ -34,7 +34,7 @@ $(TMP_DIR) : $(TMP_DIR)/_all_manifests.yaml: $(TMP_DIR) kustomize build $(REPO_ROOT)/config/installation/ > $(TMP_DIR)/_all_manifests.yaml -crds: $(TMP_DIR)/_all_manifests.yaml $(TMP_DIR) +crds: $(TMP_DIR)/_all_manifests.yaml $(TMP_DIR) $(OLM_MANIFEST_DIR) yq 'select(.kind == "CustomResourceDefinition")' -s '"rabbitmq.com_" + .spec.names.singular' $(TMP_DIR)/_all_manifests.yaml mv -v $(CURDIR)/rabbitmq.com_*.y*ml $(REPO_ROOT)/olm/bundle/manifests/ @@ -42,7 +42,7 @@ rbac: $(OLM_TMP_DIR) ## Extract RBAC rules to a temporary file yq '{"rules": .rules}' $(REPO_ROOT)/config/rbac/role.yaml > $(TMP_DIR)/role-rules.yaml QUAY_IO_OPERATOR_IMAGE ?= quay.io/rabbitmqoperator/messaging-topology-operator:latest -deployment: $(TMP_DIR)/_all_manifests.yaml $(TMP_DIR) ## Extract Deployment spec. Customise using QUAY_IO_OPERATOR_IMAGE +deployment: $(TMP_DIR)/_all_manifests.yaml $(TMP_DIR) $(OLM_MANIFEST_DIR) ## Extract Deployment spec. Customise using QUAY_IO_OPERATOR_IMAGE kustomize build $(REPO_ROOT)/config/installation/ | \ ytt -f- -f $(REPO_ROOT)/config/ytt_overlays/change_deployment_image.yml \ --data-value operator_image=$(QUAY_IO_OPERATOR_IMAGE) \ @@ -75,8 +75,8 @@ all::webhooks all::olm-manifests clean: - rm -f -v $(REPO_ROOT)/olm/bundle/manifests/*.y*ml - rm -f -v $(REPO_ROOT)/olm/bundle/crds/*.y*ml + rm -r -f -v $(REPO_ROOT)/olm/bundle/manifests/ + rm -r -f -v $(REPO_ROOT)/olm/bundle/crds/ ########### ## Build ## @@ -107,13 +107,14 @@ CO_CATALOG_DIR = $(REPO_ROOT)/olm/catalog/cool-catalog/rabbitmq-cluster-operator $(CO_CATALOG_DIR) : mkdir -p $@ +.PHONY: catalog-replace-bundle catalog-build catalog-push catalog-deploy catalog-undeploy catalog-clean catalog-all + # Cluster Operator related variables # Cluster Op is required here because it's a dependency of the top-op CO_BUNDLE_NAME ?= rabbitmq-cluster-operator CO_BUNDLE_VERSION ?= 2.15.0 CO_BUNDLE_IMAGE ?= quay.io/rabbitmqoperator/rabbitmq-for-kubernetes-olm-cluster-operator:$(CO_BUNDLE_VERSION) -.PHONY: catalog-* -catalog-replace-bundle: $(CATALOG_DIR) ## Generate catalog manifest. Customise using BUNDLE_IMAGE and BUNDLE_VERSION +catalog-replace-bundle: $(CATALOG_DIR) $(CO_CATALOG_DIR) ## Generate catalog manifest. Customise using BUNDLE_IMAGE and BUNDLE_VERSION ytt -f $(REPO_ROOT)/olm/catalog/templates/catalog-template.yaml \ --data-value name="rabbitmq-messaging-topology-operator" \ --data-value image="$(BUNDLE_IMAGE)" \ diff --git a/scripts/print-previous-tag-version.bash b/scripts/print-previous-tag-version.bash new file mode 100755 index 00000000..9b43a1c6 --- /dev/null +++ b/scripts/print-previous-tag-version.bash @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +if [ -n "$1" ]; then + echo "PREVIOUS_VERSION=$1" + exit 0 +fi + +set -e + +prev=$(gh release list --exclude-drafts --exclude-pre-releases --limit 2 --json tagName --jq '.[1].tagName') +printf "PREVIOUS_VERSION=%s\n" "${prev}" diff --git a/scripts/print-tag-version.bash b/scripts/print-tag-version.bash index 207f80c0..9eaa286f 100755 --- a/scripts/print-tag-version.bash +++ b/scripts/print-tag-version.bash @@ -1,5 +1,10 @@ #!/usr/bin/env bash +if [ -n "$1" ]; then + echo "BUNDLE_VERSION=$1" + exit 0 +fi + if [ "$GITHUB_REF_TYPE" != "tag" ]; then echo "BUNDLE_VERSION=0.0.0" exit 0 From 03b50cfb67023ba9910259572bda53d612c2489f Mon Sep 17 00:00:00 2001 From: Aitor Perez <1515757+Zerpet@users.noreply.github.com> Date: Tue, 8 Jul 2025 13:04:04 +0100 Subject: [PATCH 4/5] Use RabbitMQ 4 in system tests --- .github/workflows/build-test-publish.yml | 1 + .../{testing-and-publishing-OLM-bundle.yml => olm.yml} | 0 .github/workflows/pr.yml | 1 + config/default/base/kustomization.yaml | 1 + system_tests/utils.go | 2 +- 5 files changed, 4 insertions(+), 1 deletion(-) rename .github/workflows/{testing-and-publishing-OLM-bundle.yml => olm.yml} (100%) diff --git a/.github/workflows/build-test-publish.yml b/.github/workflows/build-test-publish.yml index 660df509..6f29cc31 100644 --- a/.github/workflows/build-test-publish.yml +++ b/.github/workflows/build-test-publish.yml @@ -138,6 +138,7 @@ jobs: - name: Build manifest env: RELEASE_VERSION: ${{ steps.meta.outputs.version }} + shell: bash # important: because it sets pipefail, so that the job fails if there are failures in the command pipe run: | make install-tools pushd config/installation diff --git a/.github/workflows/testing-and-publishing-OLM-bundle.yml b/.github/workflows/olm.yml similarity index 100% rename from .github/workflows/testing-and-publishing-OLM-bundle.yml rename to .github/workflows/olm.yml diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 71949a40..c7d98ec9 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -107,6 +107,7 @@ jobs: - name: System tests env: IMG: local/rabbitmq-topology-operator:pr + shell: bash # important: because it sets pipefail, so that the job fails if there are failures in the command pipe run: | kind load image-archive /tmp/operator.tar --name topology-operator-testing make cert-manager cmctl diff --git a/config/default/base/kustomization.yaml b/config/default/base/kustomization.yaml index 394d9a61..2ff34c43 100644 --- a/config/default/base/kustomization.yaml +++ b/config/default/base/kustomization.yaml @@ -11,6 +11,7 @@ resources: patches: - path: manager_webhook_patch.yaml - path: webhookcainjection_patch.yaml +# TODO: remove webhook ca injection? we remove it using sed in Makefile images: - name: controller diff --git a/system_tests/utils.go b/system_tests/utils.go index 5391865c..19eaa938 100644 --- a/system_tests/utils.go +++ b/system_tests/utils.go @@ -184,7 +184,7 @@ func basicTestRabbitmqCluster(name, namespace string) *rabbitmqv1beta1.RabbitmqC }, Spec: rabbitmqv1beta1.RabbitmqClusterSpec{ Replicas: ptr.To(int32(1)), - Image: "rabbitmq:3-management", + Image: "rabbitmq:4-management", Resources: &corev1.ResourceRequirements{ Requests: corev1.ResourceList{ corev1.ResourceMemory: resource.MustParse("100Mi"), From 00b9b2fccfd48fb10afa0e41f4d795af729ad240 Mon Sep 17 00:00:00 2001 From: Aitor Perez <1515757+Zerpet@users.noreply.github.com> Date: Tue, 8 Jul 2025 18:33:55 +0100 Subject: [PATCH 5/5] Fix system test for rabbitmq 4 We were creating policies with mirroring keys, that are not valid in RabbitMQ 4. Some readiness steps were asserting on number of global parameters present, which has changed in RMQ 4 with the vhost tags. Now we assert on the presence on specific parameter. --- system_tests/operatorpolicy_system_test.go | 19 +++++--- system_tests/policy_system_test.go | 12 ++--- .../schema_replication_system_test.go | 48 +++++++++---------- system_tests/tls_system_test.go | 29 +++++------ system_tests/utils.go | 1 + system_tests/vhost_system_test.go | 8 ++++ 6 files changed, 64 insertions(+), 53 deletions(-) diff --git a/system_tests/operatorpolicy_system_test.go b/system_tests/operatorpolicy_system_test.go index 326ed1d5..427e2219 100644 --- a/system_tests/operatorpolicy_system_test.go +++ b/system_tests/operatorpolicy_system_test.go @@ -38,13 +38,20 @@ var _ = Describe("OperatorPolicy", func() { Pattern: "test-queue", ApplyTo: "queues", Definition: &runtime.RawExtension{ - Raw: []byte(`{"ha-mode":"all"}`), + Raw: []byte(`{"delivery-limit": 5}`), }, }, } }) AfterEach(func() { + if CurrentSpecReport().Failed() { + out, err := kubectl("logs", "-n", "rabbitmq-system", rmq.Name+"server-0") + if err != nil { + GinkgoWriter.Printf("error getting rabbitmq logs: %v\n", err) + } + GinkgoWriter.Printf("rabbitmq logs:\n%s\n", string(out)) + } _ = k8sClient.Delete(ctx, policy) }) @@ -66,7 +73,7 @@ var _ = Describe("OperatorPolicy", func() { "Priority": Equal(0), })) - Expect(fetchedPolicy.Definition).To(HaveKeyWithValue("ha-mode", "all")) + Expect(fetchedPolicy.Definition).To(HaveKeyWithValue("delivery-limit", BeEquivalentTo(5))) By("updating status condition 'Ready'") updatedPolicy := topology.OperatorPolicy{} @@ -97,9 +104,7 @@ var _ = Describe("OperatorPolicy", func() { By("updating operator policy definitions successfully") Expect(k8sClient.Get(ctx, types.NamespacedName{Name: policy.Name, Namespace: policy.Namespace}, policy)).To(Succeed()) policy.Spec.Definition = &runtime.RawExtension{ - Raw: []byte(`{"ha-mode":"exactly", -"ha-params": 2 -}`)} + Raw: []byte(`{"delivery-limit": 3, "expires": 1800}`)} Expect(k8sClient.Update(ctx, policy, &client.UpdateOptions{})).To(Succeed()) Eventually(func() rabbithole.PolicyDefinition { @@ -109,8 +114,8 @@ var _ = Describe("OperatorPolicy", func() { return fetchedPolicy.Definition }, 10, 2).Should(HaveLen(2)) - Expect(fetchedPolicy.Definition).To(HaveKeyWithValue("ha-mode", "exactly")) - Expect(fetchedPolicy.Definition).To(HaveKeyWithValue("ha-params", float64(2))) + Expect(fetchedPolicy.Definition).To(HaveKeyWithValue("delivery-limit", BeEquivalentTo(3))) + Expect(fetchedPolicy.Definition).To(HaveKeyWithValue("expires", BeEquivalentTo(1800))) By("deleting policy") Expect(k8sClient.Delete(ctx, policy)).To(Succeed()) diff --git a/system_tests/policy_system_test.go b/system_tests/policy_system_test.go index 42312f8d..ae284b3e 100644 --- a/system_tests/policy_system_test.go +++ b/system_tests/policy_system_test.go @@ -37,7 +37,7 @@ var _ = Describe("Policy", func() { Pattern: "test-queue", ApplyTo: "queues", Definition: &runtime.RawExtension{ - Raw: []byte(`{"ha-mode":"all"}`), + Raw: []byte(`{"delivery-limit": 5}`), }, }, } @@ -65,7 +65,7 @@ var _ = Describe("Policy", func() { "Priority": Equal(0), })) - Expect(fetchedPolicy.Definition).To(HaveKeyWithValue("ha-mode", "all")) + Expect(fetchedPolicy.Definition).To(HaveKeyWithValue("delivery-limit", BeEquivalentTo(5))) By("updating status condition 'Ready'") updatedPolicy := topology.Policy{} @@ -96,9 +96,7 @@ var _ = Describe("Policy", func() { By("updating policy definitions successfully") Expect(k8sClient.Get(ctx, types.NamespacedName{Name: policy.Name, Namespace: policy.Namespace}, policy)).To(Succeed()) policy.Spec.Definition = &runtime.RawExtension{ - Raw: []byte(`{"ha-mode":"exactly", -"ha-params": 2 -}`)} + Raw: []byte(`{"delivery-limit": 3, "expires": 180}`)} Expect(k8sClient.Update(ctx, policy, &client.UpdateOptions{})).To(Succeed()) Eventually(func() rabbithole.PolicyDefinition { @@ -108,8 +106,8 @@ var _ = Describe("Policy", func() { return fetchedPolicy.Definition }, 10, 2).Should(HaveLen(2)) - Expect(fetchedPolicy.Definition).To(HaveKeyWithValue("ha-mode", "exactly")) - Expect(fetchedPolicy.Definition).To(HaveKeyWithValue("ha-params", float64(2))) + Expect(fetchedPolicy.Definition).To(HaveKeyWithValue("delivery-limit", BeEquivalentTo(3))) + Expect(fetchedPolicy.Definition).To(HaveKeyWithValue("expires", BeEquivalentTo(180))) By("deleting policy") Expect(k8sClient.Delete(ctx, policy)).To(Succeed()) diff --git a/system_tests/schema_replication_system_test.go b/system_tests/schema_replication_system_test.go index 7b16c76d..02037b5b 100644 --- a/system_tests/schema_replication_system_test.go +++ b/system_tests/schema_replication_system_test.go @@ -7,6 +7,7 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" "sigs.k8s.io/controller-runtime/pkg/client" + "time" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" @@ -57,25 +58,27 @@ var _ = Describe("schema replication", func() { }) It("works", func() { + SetDefaultEventuallyPollingInterval(2 * time.Second) + SetDefaultEventuallyTimeout(30 * time.Second) + getRabbitGlobalParams := func() ([]rabbithole.GlobalRuntimeParameter, error) { + return rabbitClient.ListGlobalParameters() + } + By("setting schema replication upstream global parameters successfully") Expect(k8sClient.Create(ctx, replication, &client.CreateOptions{})).To(Succeed()) - var allGlobalParams []rabbithole.GlobalRuntimeParameter - Eventually(func() []rabbithole.GlobalRuntimeParameter { - var err error - allGlobalParams, err = rabbitClient.ListGlobalParameters() - Expect(err).NotTo(HaveOccurred()) - return allGlobalParams - }, 30, 2).Should(HaveLen(3)) // cluster_name and internal_cluster_id are set by default by RabbitMQ - - Expect(allGlobalParams).To(ContainElement( - rabbithole.GlobalRuntimeParameter{ - Name: "schema_definition_sync_upstream", - Value: map[string]interface{}{ - "endpoints": []interface{}{"abc.endpoints.local:5672", "efg.endpoints.local:1234"}, - "username": "some-username", - "password": "some-password", - }, - })) + DeferCleanup(func() { + // leaving a cleanup step in case the test fails, so that it does not leave behind resources + // In the happy path, the schemareplication object is deleted, and the following command is a no-op + _ = k8sClient.Delete(ctx, replication, &client.DeleteOptions{}) + }) + Eventually(getRabbitGlobalParams).Should(ContainElement(And( + HaveField("Name", "schema_definition_sync_upstream"), + HaveField("Value", And( + HaveKeyWithValue("endpoints", ContainElements("abc.endpoints.local:5672", "efg.endpoints.local:1234")), + HaveKeyWithValue("username", "some-username"), + HaveKeyWithValue("password", "some-password"), + )), + ))) By("updating status condition 'Ready'") updatedReplication := topology.SchemaReplication{} @@ -83,13 +86,13 @@ var _ = Describe("schema replication", func() { Eventually(func() []topology.Condition { Expect(k8sClient.Get(ctx, types.NamespacedName{Name: replication.Name, Namespace: replication.Namespace}, &updatedReplication)).To(Succeed()) return updatedReplication.Status.Conditions - }, waitUpdatedStatusCondition, 2).Should(HaveLen(1), "Schema Replication status condition should be present") + }, waitUpdatedStatusCondition).Should(HaveLen(1), "Schema Replication status condition should be present") readyCondition := updatedReplication.Status.Conditions[0] Expect(string(readyCondition.Type)).To(Equal("Ready")) Expect(readyCondition.Status).To(Equal(corev1.ConditionTrue)) Expect(readyCondition.Reason).To(Equal("SuccessfulCreateOrUpdate")) - Expect(readyCondition.LastTransitionTime).NotTo(Equal(metav1.Time{})) + Expect(readyCondition.LastTransitionTime).NotTo(BeZero()) By("setting correct finalizer") Expect(updatedReplication.ObjectMeta.Finalizers).To(ConsistOf("deletion.finalizers.schemareplications.rabbitmq.com")) @@ -105,11 +108,6 @@ var _ = Describe("schema replication", func() { By("unsetting schema replication upstream global parameters on deletion") Expect(k8sClient.Delete(ctx, replication)).To(Succeed()) - Eventually(func() []rabbithole.GlobalRuntimeParameter { - var err error - allGlobalParams, err = rabbitClient.ListGlobalParameters() - Expect(err).NotTo(HaveOccurred()) - return allGlobalParams - }, 30, 2).Should(HaveLen(2)) // cluster_name and internal_cluster_id are set by default by RabbitMQ + Eventually(getRabbitGlobalParams).ShouldNot(ContainElement(HaveField("Name", "schema_definition_sync_upstream"))) }) }) diff --git a/system_tests/tls_system_test.go b/system_tests/tls_system_test.go index c2f94817..5617c30f 100644 --- a/system_tests/tls_system_test.go +++ b/system_tests/tls_system_test.go @@ -3,6 +3,8 @@ package system_tests import ( "context" "fmt" + "sigs.k8s.io/controller-runtime/pkg/envtest/komega" + "time" "github.com/google/uuid" . "github.com/onsi/ginkgo/v2" @@ -12,7 +14,6 @@ import ( corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/types" "sigs.k8s.io/controller-runtime/pkg/client" ) @@ -119,6 +120,8 @@ var _ = Describe("RabbitMQ Cluster with TLS enabled", func() { }) It("works", func() { + k := komega.New(k8sClient) + By("successfully creating object when rabbitmqClusterReference.name is set") policy = topology.Policy{ ObjectMeta: metav1.ObjectMeta{ @@ -130,20 +133,19 @@ var _ = Describe("RabbitMQ Cluster with TLS enabled", func() { Pattern: ".*", ApplyTo: "queues", Definition: &runtime.RawExtension{ - Raw: []byte(`{"ha-mode":"all"}`), + Raw: []byte(`{"max-length": 10000}`), }, RabbitmqClusterReference: targetClusterRef, }, } Expect(k8sClient.Create(ctx, &policy)).To(Succeed()) - var fetchedPolicy topology.Policy - Eventually(func() []topology.Condition { - Expect(k8sClient.Get(ctx, types.NamespacedName{Name: policy.Name, Namespace: policy.Namespace}, &fetchedPolicy)).To(Succeed()) - return fetchedPolicy.Status.Conditions - }, waitUpdatedStatusCondition, 2).Should(HaveLen(1), "policy status condition should be present") + Eventually(k.Object(&policy)). + WithTimeout(waitUpdatedStatusCondition). + WithPolling(2*time.Second). + Should(HaveField("Status.Conditions", HaveLen(1)), "policy status condition should be present") - readyCondition := fetchedPolicy.Status.Conditions[0] + readyCondition := policy.Status.Conditions[0] Expect(string(readyCondition.Type)).To(Equal("Ready")) Expect(readyCondition.Status).To(Equal(corev1.ConditionTrue)) Expect(readyCondition.Reason).To(Equal("SuccessfulCreateOrUpdate")) @@ -177,13 +179,12 @@ var _ = Describe("RabbitMQ Cluster with TLS enabled", func() { } Expect(k8sClient.Create(ctx, &exchange)).To(Succeed()) - var fetched topology.Exchange - Eventually(func() []topology.Condition { - Expect(k8sClient.Get(ctx, types.NamespacedName{Name: exchange.Name, Namespace: exchange.Namespace}, &fetched)).To(Succeed()) - return fetched.Status.Conditions - }, 10, 2).Should(HaveLen(1)) + Eventually(k.Object(&exchange)). + WithTimeout(waitUpdatedStatusCondition). + WithPolling(2*time.Second). + Should(HaveField("Status.Conditions", HaveLen(1)), "exchange status condition should be present") - readyCondition = fetched.Status.Conditions[0] + readyCondition = exchange.Status.Conditions[0] Expect(string(readyCondition.Type)).To(Equal("Ready")) Expect(readyCondition.Status).To(Equal(corev1.ConditionTrue)) Expect(readyCondition.Reason).To(Equal("SuccessfulCreateOrUpdate")) diff --git a/system_tests/utils.go b/system_tests/utils.go index 19eaa938..19e8d6cf 100644 --- a/system_tests/utils.go +++ b/system_tests/utils.go @@ -195,6 +195,7 @@ func basicTestRabbitmqCluster(name, namespace string) *rabbitmqv1beta1.RabbitmqC }, Rabbitmq: rabbitmqv1beta1.RabbitmqClusterConfigurationSpec{ AdditionalPlugins: []rabbitmqv1beta1.Plugin{"rabbitmq_federation", "rabbitmq_shovel", "rabbitmq_stream"}, + AdditionalConfig: "log.console.level = debug", }, }, } diff --git a/system_tests/vhost_system_test.go b/system_tests/vhost_system_test.go index 605f221e..52236563 100644 --- a/system_tests/vhost_system_test.go +++ b/system_tests/vhost_system_test.go @@ -178,10 +178,18 @@ var _ = Describe("vhost", func() { }) AfterEach(func() { + if CurrentSpecReport().Failed() { + out, err := kubectl("logs", "-n", "rabbitmq-system", rmq.Name+"server-0") + if err != nil { + GinkgoWriter.Printf("error getting rabbitmq logs: %v\n", err) + } + GinkgoWriter.Printf("rabbitmq logs:\n%s\n", string(out)) + } Expect(k8sClient.Delete(ctx, vhostWithLimits)).To(Succeed()) }) It("configures the limits", func() { + // TODO: this test seems flaky, perhaps it's racy to create the vhost, get the vhost and set/get vhost limits var err error var vhostLimitsInfoResponse []rabbithole.VhostLimitsInfo Eventually(func() error {