Does anyone know a way to refer to a namespace inside of values.yaml using an environment variable?
For example, when mapping a secret
secret:
# RabbitMQ password
V_RABBIT_PASSWORD:
secretKeyRef:
name: jx-staging-rabbit //<--- this needs to work for staging and prod
key: rabbitmq-password
This is the section in deployment.yaml
- name: {{ $name | quote }}
valueFrom:
secretKeyRef:
name: {{ $value.secretKeyRef.name | quote }} //<-- trying different combinations here
key: {{ $value.secretKeyRef.key | quote }}
attempts:
${NAMESPACE}-{{ $value.secretKeyRef.name | quote }}
and
{{ template "namespace" . }}-{{ $value.secretKeyRef.name | quote }}
Thanks