Files
sealos/pkg/env
fengxsong 50a6cd10e2 fix: replace text/template from html/template (#2067)
* fix: replace text/template from html/template

Signed-off-by: fengxsong <fengxsong@outlook.com>

* fix: semgrep ignore import-text-template finding

Signed-off-by: fengxsong <fengxsong@outlook.com>

Signed-off-by: fengxsong <fengxsong@outlook.com>
2022-11-09 11:10:51 +08:00
..

ENV module

This module will merge the host env and global env, then render env into cloudrootfs templates or set env when exec a shell command and script.

ENV template render

ENV module only render the filename has ".tmpl" suffix, and render the result into a new file.

Like: test.yaml.tmpl -> test.yaml

test.yaml.tmpl:

{{ .foo }}

render result, test.yaml:

bar

Shell ENV

Add ENV value to each shell command.

Raw shell command:

cat /etc/hosts

WrapperShell:

foo=bar cat /etc/hosts