Skip to content

Commit

Permalink
Break into one object per yaml file to appease yamllint
Browse files Browse the repository at this point in the history
  • Loading branch information
Steve Keay committed Sep 11, 2024
1 parent e1c2647 commit 92e4c91
Show file tree
Hide file tree
Showing 10 changed files with 94 additions and 91 deletions.
1 change: 0 additions & 1 deletion .github/workflows/yamllint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ jobs:
with:
jsonSchemaFile: workflows/.workflow_with_description.schema.json
yamlFiles: |
workflows/argo-events/secrets/*.y*ml
workflows/argo-events/sensors/*.y*ml
workflows/argo-events/eventsources/*.y*ml
workflows/argo-events/roles/*.y*ml
Expand Down
41 changes: 0 additions & 41 deletions workflows/openstack/argo-rabbitmq.yaml

This file was deleted.

11 changes: 0 additions & 11 deletions workflows/openstack/eventbus-default.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,3 @@ spec:
# storageClassName: standard
# accessMode: ReadWriteOnce
# volumeSize: 10Gi
---
apiVersion: policy/v1
kind: PodDisruptionBudget
metadata:
name: eventbus-default-pdb
spec:
maxUnavailable: 1
selector:
matchLabels:
controller: eventbus-controller
eventbus-name: default
Original file line number Diff line number Diff line change
Expand Up @@ -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
36 changes: 36 additions & 0 deletions workflows/openstack/eventsource-openstack-keystone.yaml
Original file line number Diff line number Diff line change
@@ -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
8 changes: 6 additions & 2 deletions workflows/openstack/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,12 @@ kind: Kustomization
namespace: openstack

resources:
- argo-rabbitmq.yaml
- eventbus-default.yaml
- openstack-event-source.yaml
- eventsource-openstack-ironic.yaml
- eventsource-openstack-keystone.yaml
- poddisruptionbudget-eventbus-default-pdb.yaml
- rabbitmq-permission-argo-to-ironic-permission.yaml
- rabbitmq-permission-argo-to-keystone-permission.yaml
- rabbitmq-user-argo.yaml
- sensor-keystone-event-project.yaml
- serviceaccount-sensor-submit-workflow.yaml
11 changes: 11 additions & 0 deletions workflows/openstack/poddisruptionbudget-eventbus-default-pdb.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
apiVersion: policy/v1
kind: PodDisruptionBudget
metadata:
name: eventbus-default-pdb
spec:
maxUnavailable: 1
selector:
matchLabels:
controller: eventbus-controller
eventbus-name: default
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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
9 changes: 9 additions & 0 deletions workflows/openstack/rabbitmq-user-argo.yaml
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 92e4c91

Please sign in to comment.