fix: add redis and rabbitmq secrets to labeled vcluster namepspaces

This commit is contained in:
2024-06-12 20:17:13 +02:00
parent 21323e0b37
commit 73a828c8e9
2 changed files with 24 additions and 0 deletions
@@ -25,6 +25,24 @@ spec:
- prod-rabbitmq
namespaces:
- rabbitmq
- name: sync-staging-rabbitmq-secret
generate:
apiVersion: v1
kind: Secret
name: staging-rabbitmq
namespace: '{{ request.object.metadata.name }}'
synchronize: true
clone:
name: staging-rabbitmq
namespace: rabbitmq
match:
any:
- resources:
kinds:
- Namespace
selector:
matchLabels:
vcluster.loft.sh/label-*: sync-staging-rabbitmq-secret
- name: add-rabbitmq-connstring
mutate:
patchStrategicMerge:
@@ -42,3 +42,9 @@ spec:
- Namespace
names:
- "vcluster-009dba7e-*"
- resources:
kinds:
- Namespace
selector:
matchLabels:
vcluster.loft.sh/label-*: sync-staging-redis-secret