Use secretKeyRef where appropriate

This commit is contained in:
erik 2023-08-10 13:19:45 +02:00
parent 0c19dd9623
commit df1fb2e79c
4 changed files with 42 additions and 13 deletions

View file

@ -25,10 +25,17 @@ spec:
- name: taiga-async-rabbitmq-data - name: taiga-async-rabbitmq-data
mountPath: /var/lib/rabbitmq mountPath: /var/lib/rabbitmq
readOnly: false readOnly: false
envFrom:
- secretRef:
name: taiga-rabbitmq-secret
env: env:
- name: RABBITMQ_DEFAULT_USER
valueFrom:
secretKeyRef:
name: taiga-rabbitmq-secret
key: RABBITMQ_DEFAULT_USER
- name: RABBITMQ_DEFAULT_PASS
valueFrom:
secretKeyRef:
name: taiga-rabbitmq-secret
key: RABBITMQ_DEFAULT_PASS
- name: RABBITMQ_ERLANG_COOKIE - name: RABBITMQ_ERLANG_COOKIE
value: ERLANG_COOKIE_VALUE value: ERLANG_COOKIE_VALUE
- name: RABBITMQ_DEFAULT_VHOST - name: RABBITMQ_DEFAULT_VHOST

View file

@ -24,7 +24,20 @@ spec:
envFrom: # ToDo: check if all vars are needed envFrom: # ToDo: check if all vars are needed
- configMapRef: - configMapRef:
name: taiga-configmap name: taiga-configmap
- secretRef: env:
name: taiga-secret - name: RABBITMQ_USER
- secretRef: valueFrom:
name: taiga-rabbitmq-secret secretKeyRef:
name: taiga-secret
key: RABBITMQ_USER
- name: RABBITMQ_PASS
valueFrom:
secretKeyRef:
name: taiga-secret
key: RABBITMQ_PASS
- name: SECRET_KEY
valueFrom:
secretKeyRef:
name: taiga-secret
key: TAIGA_SECRET_KEY

View file

@ -25,14 +25,21 @@ spec:
- name: taiga-events-rabbitmq-data - name: taiga-events-rabbitmq-data
mountPath: /var/lib/rabbitmq mountPath: /var/lib/rabbitmq
readOnly: false readOnly: false
envFrom:
- secretRef: # ToDo secret key ref
name: taiga-rabbitmq-secret
env: env:
- name: RABBITMQ_ERLANG_COOKIE - name: RABBITMQ_ERLANG_COOKIE
value: ERLANG_COOKIE_VALUE value: ERLANG_COOKIE_VALUE
- name: RABBITMQ_DEFAULT_VHOST - name: RABBITMQ_DEFAULT_VHOST
value: RABBITMQ_VHOST value: RABBITMQ_VHOST
- name: RABBITMQ_USER
valueFrom:
secretKeyRef:
name: taiga-secret
key: RABBITMQ_USER
- name: RABBITMQ_PASS
valueFrom:
secretKeyRef:
name: taiga-secret
key: RABBITMQ_PASS
volumes: volumes:
- name: taiga-events-rabbitmq-data - name: taiga-events-rabbitmq-data

View file

@ -21,9 +21,11 @@ spec:
ports: ports:
- name: http - name: http
containerPort: 8003 containerPort: 8003
envFrom: # ToDo secret key ref - secret_key
- secretRef:
name: taiga-secret
env: env:
- name: MAX_AGE - name: MAX_AGE
value: ATTACHMENTS_MAX_AGE value: ATTACHMENTS_MAX_AGE
- name: SECRET_KEY
valueFrom:
secretKeyRef:
name: taiga-secret
key: TAIGA_SECRET_KEY