From 26ad85bfe1efc6ea8ad8ea4b565c48a1e3558a2d Mon Sep 17 00:00:00 2001 From: Steve Keay Date: Wed, 11 Sep 2024 12:56:30 +0100 Subject: [PATCH] Break into one object per yaml file to appease yamllint --- workflows/openstack/argo-rabbitmq.yaml | 41 ------------------- ...yaml => eventsource-openstack-ironic.yaml} | 36 ---------------- .../eventsource-openstack-keystone.yaml | 36 ++++++++++++++++ ...-permission-argo-to-ironic-permission.yaml | 16 ++++++++ ...ermission-argo-to-keystone-permission.yaml | 16 ++++++++ workflows/openstack/rabbitmq-user-argo.yaml | 9 ++++ 6 files changed, 77 insertions(+), 77 deletions(-) delete mode 100644 workflows/openstack/argo-rabbitmq.yaml rename workflows/openstack/{openstack-event-source.yaml => eventsource-openstack-ironic.yaml} (50%) create mode 100644 workflows/openstack/eventsource-openstack-keystone.yaml create mode 100644 workflows/openstack/rabbitmq-permission-argo-to-ironic-permission.yaml create mode 100644 workflows/openstack/rabbitmq-permission-argo-to-keystone-permission.yaml create mode 100644 workflows/openstack/rabbitmq-user-argo.yaml diff --git a/workflows/openstack/argo-rabbitmq.yaml b/workflows/openstack/argo-rabbitmq.yaml deleted file mode 100644 index 373926ed8..000000000 --- a/workflows/openstack/argo-rabbitmq.yaml +++ /dev/null @@ -1,41 +0,0 @@ ---- -apiVersion: rabbitmq.com/v1beta1 -kind: User -metadata: - name: argo -spec: - rabbitmqClusterReference: - name: rabbitmq # rabbitmqCluster must exist in the same namespace as this resource - namespace: openstack ---- -apiVersion: rabbitmq.com/v1beta1 -kind: Permission -metadata: - name: argo-to-ironic-permission -spec: - vhost: "ironic" - userReference: - name: "argo" # name of a user.rabbitmq.com in the same namespace; must specify either spec.userReference or spec.user - permissions: - write: ".*" - configure: ".*" - read: ".*" - rabbitmqClusterReference: - name: rabbitmq # rabbitmqCluster must exist in the same namespace as this resource - namespace: openstack ---- -apiVersion: rabbitmq.com/v1beta1 -kind: Permission -metadata: - name: argo-to-keystone-permission -spec: - vhost: "keystone" - userReference: - name: "argo" # name of a user.rabbitmq.com in the same namespace; must specify either spec.userReference or spec.user - permissions: - write: ".*" - configure: ".*" - read: ".*" - rabbitmqClusterReference: - name: rabbitmq # rabbitmqCluster must exist in the same namespace as this resource - namespace: openstack diff --git a/workflows/openstack/openstack-event-source.yaml b/workflows/openstack/eventsource-openstack-ironic.yaml similarity index 50% rename from workflows/openstack/openstack-event-source.yaml rename to workflows/openstack/eventsource-openstack-ironic.yaml index 4e71dfe5e..be6db4028 100644 --- a/workflows/openstack/openstack-event-source.yaml +++ b/workflows/openstack/eventsource-openstack-ironic.yaml @@ -33,39 +33,3 @@ spec: password: name: argo-user-credentials key: password ---- -apiVersion: argoproj.io/v1alpha1 -kind: EventSource -metadata: - name: openstack-keystone -spec: - amqp: - notifications: - # amqp server url - url: amqp://rabbitmq-server-0.rabbitmq-nodes.openstack.svc.cluster.local:5672/keystone - # jsonBody specifies that all event body payload coming from this - # source will be JSON - jsonBody: true - # name of the exchange. - exchangeName: keystone - exchangeType: topic - exchangeDeclare: - durable: false - # routing key for messages within the exchange - routingKey: 'notifications.info' - # optional consume settings - # if not provided, default values will be used - consume: - consumerTag: "argo-events" - autoAck: true - exclusive: false - noLocal: false - # username and password for authentication - # use secret selectors - auth: - username: - name: argo-user-credentials - key: username - password: - name: argo-user-credentials - key: password diff --git a/workflows/openstack/eventsource-openstack-keystone.yaml b/workflows/openstack/eventsource-openstack-keystone.yaml new file mode 100644 index 000000000..86d1d4455 --- /dev/null +++ b/workflows/openstack/eventsource-openstack-keystone.yaml @@ -0,0 +1,36 @@ +--- +apiVersion: argoproj.io/v1alpha1 +kind: EventSource +metadata: + name: openstack-keystone +spec: + amqp: + notifications: + # amqp server url + url: amqp://rabbitmq-server-0.rabbitmq-nodes.openstack.svc.cluster.local:5672/keystone + # jsonBody specifies that all event body payload coming from this + # source will be JSON + jsonBody: true + # name of the exchange. + exchangeName: keystone + exchangeType: topic + exchangeDeclare: + durable: false + # routing key for messages within the exchange + routingKey: 'notifications.info' + # optional consume settings + # if not provided, default values will be used + consume: + consumerTag: "argo-events" + autoAck: true + exclusive: false + noLocal: false + # username and password for authentication + # use secret selectors + auth: + username: + name: argo-user-credentials + key: username + password: + name: argo-user-credentials + key: password diff --git a/workflows/openstack/rabbitmq-permission-argo-to-ironic-permission.yaml b/workflows/openstack/rabbitmq-permission-argo-to-ironic-permission.yaml new file mode 100644 index 000000000..be96937ba --- /dev/null +++ b/workflows/openstack/rabbitmq-permission-argo-to-ironic-permission.yaml @@ -0,0 +1,16 @@ +--- +apiVersion: rabbitmq.com/v1beta1 +kind: Permission +metadata: + name: argo-to-ironic-permission +spec: + vhost: "ironic" + userReference: + name: "argo" # name of a user.rabbitmq.com in the same namespace; must specify either spec.userReference or spec.user + permissions: + write: ".*" + configure: ".*" + read: ".*" + rabbitmqClusterReference: + name: rabbitmq # rabbitmqCluster must exist in the same namespace as this resource + namespace: openstack diff --git a/workflows/openstack/rabbitmq-permission-argo-to-keystone-permission.yaml b/workflows/openstack/rabbitmq-permission-argo-to-keystone-permission.yaml new file mode 100644 index 000000000..ba1bc606f --- /dev/null +++ b/workflows/openstack/rabbitmq-permission-argo-to-keystone-permission.yaml @@ -0,0 +1,16 @@ +--- +apiVersion: rabbitmq.com/v1beta1 +kind: Permission +metadata: + name: argo-to-keystone-permission +spec: + vhost: "keystone" + userReference: + name: "argo" # name of a user.rabbitmq.com in the same namespace; must specify either spec.userReference or spec.user + permissions: + write: ".*" + configure: ".*" + read: ".*" + rabbitmqClusterReference: + name: rabbitmq # rabbitmqCluster must exist in the same namespace as this resource + namespace: openstack diff --git a/workflows/openstack/rabbitmq-user-argo.yaml b/workflows/openstack/rabbitmq-user-argo.yaml new file mode 100644 index 000000000..bbcccd9bd --- /dev/null +++ b/workflows/openstack/rabbitmq-user-argo.yaml @@ -0,0 +1,9 @@ +--- +apiVersion: rabbitmq.com/v1beta1 +kind: User +metadata: + name: argo +spec: + rabbitmqClusterReference: + name: rabbitmq # rabbitmqCluster must exist in the same namespace as this resource + namespace: openstack