Dynamic data in values.yaml file

Viewed 40

I am trying to find a way to populate values.yaml with values I get from a DB tables.

I have values.yaml with values like this:

...
my_image:
  repository: my_repo
  replicaCount: 1
  tag: latest
  name: my_name
...

In my template.yaml file I have this:

...
  - image: "{{ .Values.my_image.repository }}:{{ .Values.my_image.tag }}"
...

I can create a json or yaml file from the query result. I know that I can not populate the values.yaml without using tpl. But I am not sure how to? Is my only option to recreate the template.yaml every time?

Is there a way to generate tagvalues.yaml with a map of tags? And use it like this in values.yaml file:

...
my_image:
  repository: my_repo
  replicaCount: 1
  tag: tagvalues.tag
  name: my_name
...
0 Answers
Related