forked from rabbitmq/messaging-topology-operator
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpublish-consume-user.yaml
33 lines (33 loc) · 922 Bytes
/
publish-consume-user.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
---
apiVersion: v1
kind: Secret
metadata:
name: test-user-credentials
type: Opaque
stringData:
username: test-user # Note that Messaging Topology Operator does not watch this secret. Updating this secret object won't update actual user credentials.
password: verysecurepw # As a workaround, you can add a label or annotation to the User object to trigger a Reconile loop and credentials will be updated.
---
apiVersion: rabbitmq.com/v1beta1
kind: User
metadata:
name: test-user
spec:
rabbitmqClusterReference:
name: test
importCredentialsSecret:
name: test-user-credentials
---
apiVersion: rabbitmq.com/v1beta1
kind: Permission
metadata:
name: testuser-permission
spec:
vhost: "test-vhost"
user: "test-user" # name corresponds to the username we provided in "test-user-credentials" secret
permissions:
write: ".*"
configure: ""
read: ".*"
rabbitmqClusterReference:
name: test