Files
sealos/pkg/env/README.md
T
cuisongliu c961d34e35 【WIP】refactor(master): add config client (#862)
* refactor(master): add config client

* refactor(master): refactor types

* refactor(master): refactor types

* refactor(master): refactor types

* refactor(master): update go mod

* refactor(master): update go mod

* refactor(master): refactor types

* refactor(master): refactor types

* refactor(master): add go mod

* refactor(master): add compress module
2022-02-20 23:36:47 +08:00

580 B

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