You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Providing an external secret for default user credentials
2
+
3
+
By default admin credentials for a RabbitmqCluster cluster are stored in a Kubernetes secret called INSTANCE-default-user, where INSTANCE is the name of the RabbitmqCluster object.
4
+
5
+
There are some cases where you want to have the flexibility to specify your own credentials in a different secret. For example you may need to use tools like ExternalSecret operator which reads information from external APIs (like a Cloud secret provider) and automatically injects the values into a Kubernetes Secret.
6
+
7
+
The creation of this secret can delay, so the RabbitMQ cluster statefulset need to delay till the secret is not created.
8
+
9
+
To do this we provide an option in the CRD called externalsecret like:
10
+
11
+
```
12
+
apiVersion: rabbitmq.com/v1beta1
13
+
kind: RabbitmqCluster
14
+
metadata:
15
+
name: external-secret-user
16
+
spec:
17
+
service:
18
+
type: LoadBalancer
19
+
replicas: 1
20
+
secretBackend:
21
+
externalSecret:
22
+
name: "my-secret"
23
+
```
24
+
25
+
When this externalSecret field is specified the default secret will not be generated by the cluster operator but the statefulset will wait until my-secret will be generated.
26
+
27
+
The secret needs to be in the same format as our default-user secret (info are specified in base64 in this case) so like:
0 commit comments