softshipper
softshipper

Reputation: 34061

How to use helm value in value?

Is it possible to use helm value in value, for example:

db:
  addr: acid-keycloak-db
  user: kcadmin
  secret: {{ user }}.{{ addr }}.credentials.postgresql.acid.zalan.do  

the output should be:

db:
  addr: acid-keycloak-db
  user: kcadmin
  secret: kcadmin.acid-keycloak-db.credentials.postgresql.acid.zalan.do   

Upvotes: 1

Views: 182

Answers (1)

hoque
hoque

Reputation: 6451

values.yaml

db:
  addr: acid-keycloak-db
  user: kcadmin
  secret: "{{ .Values.db.user }}.{{ .Values.db.addr }}.credentials.postgresql.acid.zalan.do"

In .yaml file where the secret will be used

{{tpl .Values.db.secret . }}

Upvotes: 2

Related Questions