Helm – Creating Secret from Variable

  In order to save the value of the variable as Secret, the variable must be encoded in base64, for this we use “_helpers.tpl” For example, we need to save the value of the variable “applicationSecret” values.yaml:   Add the following to “_helpers.tpl“: _helpers.tpl:   Now in the “templates” directory, create the file “secret.yaml” secret.yaml:

Ansible – Template: to_nice_json

In order to create a file from the template and immediately save it as “Pretty JSON“, you can use the “copy” module with the “content” key. For example, save the template “config.j2” as the file “/app/config.json” Playbook: