fix env value lost in environment values (#605)

* fix env value lost in environment values

Signed-off-by: yxxhero <aiopsclub@163.com>

* add more test

Signed-off-by: yxxhero <aiopsclub@163.com>

Signed-off-by: yxxhero <aiopsclub@163.com>
This commit is contained in:
yxxhero
2022-12-27 09:48:07 +08:00
committed by GitHub
parent 6664f01596
commit d8cb740dcf
12 changed files with 111 additions and 15 deletions
@@ -1,6 +1,3 @@
localChartRepoServer:
enabled: true
port: 18083
chartifyTempDir: envs_releases_within_same_yaml_part
helmfileArgs:
- --environment
@@ -0,0 +1,5 @@
chartifyTempDir: environments_values_gotmpl_with_environment_name
helmfileArgs:
- --environment
- test
- template
@@ -0,0 +1,12 @@
environments:
test:
values:
- test.yaml.gotmpl
---
releases:
- name: raw
chart: ../../charts/raw-0.0.1
values:
- templates:
- |
envName: {{ .Values.envName }}
@@ -0,0 +1,6 @@
Building dependency release=raw, chart=../../charts/raw-0.0.1
Templating release=raw, chart=../../charts/raw-0.0.1
---
# Source: raw/templates/resources.yaml
envName: test
@@ -0,0 +1 @@
envName: {{ .Environment.Name }}