change the nest level of envvals overrides for nested state files(sub-helmfiles) (#635)
We added envvals overrides in the state file via #622 two days ago: ``` helmfiles: - name: sub.helmfile.yaml environment: values: - mykey: myvalue ``` This change removes the `environment` level in the above cofig, so that it looks like: ``` helmfiles: - name: sub.helmfile.yaml values: - mykey: myvalue `` This is an inevitable breaking change towards #361. But I wanted to break it earlier so that less folks are affected.` Ref https://github.com/roboll/helmfile/issues/361#issuecomment-497530819
This commit is contained in:
parent
9318d8a040
commit
68b95f14d4
|
|
@ -175,11 +175,11 @@ helmfiles:
|
||||||
# helmfile -f path/to/subhelmfile.yaml -l name=prometheus sync
|
# helmfile -f path/to/subhelmfile.yaml -l name=prometheus sync
|
||||||
selectors:
|
selectors:
|
||||||
- name=prometheus
|
- name=prometheus
|
||||||
environment:
|
# Override state values
|
||||||
values:
|
values:
|
||||||
# Environment values files merged into the nested state
|
# Values files merged into the nested state's values
|
||||||
- additiona.values.yaml
|
- additiona.values.yaml
|
||||||
# Inline environment values merged into the nested state
|
# Inline state values merged into the nested state's values
|
||||||
- key1: val1
|
- key1: val1
|
||||||
- # All the nested state files under `helmfiles:` is processed in the order of definition.
|
- # All the nested state files under `helmfiles:` is processed in the order of definition.
|
||||||
# So it can be used for preparation for your main `releases`. An example would be creating CRDs required by `reelases` in the parent state file.
|
# So it can be used for preparation for your main `releases`. An example would be creating CRDs required by `reelases` in the parent state file.
|
||||||
|
|
|
||||||
|
|
@ -664,12 +664,10 @@ func TestVisitDesiredStatesWithReleasesFiltered_EmbeddedNestedStateAdditionalEnv
|
||||||
"/path/to/helmfile.yaml": `
|
"/path/to/helmfile.yaml": `
|
||||||
helmfiles:
|
helmfiles:
|
||||||
- path: helmfile.d/a*.yaml
|
- path: helmfile.d/a*.yaml
|
||||||
environment:
|
|
||||||
values:
|
values:
|
||||||
- env.values.yaml
|
- env.values.yaml
|
||||||
- helmfile.d/b*.yaml
|
- helmfile.d/b*.yaml
|
||||||
- path: helmfile.d/c*.yaml
|
- path: helmfile.d/c*.yaml
|
||||||
environment:
|
|
||||||
values:
|
values:
|
||||||
- env.values.yaml
|
- env.values.yaml
|
||||||
- tillerNs: INLINE_TILLER_NS_3
|
- tillerNs: INLINE_TILLER_NS_3
|
||||||
|
|
|
||||||
|
|
@ -1477,7 +1477,7 @@ func (hf *SubHelmfileSpec) UnmarshalYAML(unmarshal func(interface{}) error) erro
|
||||||
Selectors []string `yaml:"selectors"`
|
Selectors []string `yaml:"selectors"`
|
||||||
SelectorsInherited bool `yaml:"selectorsInherited"`
|
SelectorsInherited bool `yaml:"selectorsInherited"`
|
||||||
|
|
||||||
Environment SubhelmfileEnvironmentSpec `yaml:"environment"`
|
Environment SubhelmfileEnvironmentSpec `yaml:",inline"`
|
||||||
}
|
}
|
||||||
if err := unmarshal(&subHelmfileSpecTmp); err != nil {
|
if err := unmarshal(&subHelmfileSpecTmp); err != nil {
|
||||||
return err
|
return err
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue