feat: mark deprecated args and cmd for v1 (#628)

* feat: mark deprecated args and cmd for v1

Signed-off-by: yxxhero <aiopsclub@163.com>
This commit is contained in:
yxxhero
2023-01-14 23:43:05 +08:00
committed by GitHub
parent db5c2a52d6
commit 8d96bbb0e4
16 changed files with 65 additions and 25 deletions
+2
View File
@@ -108,6 +108,7 @@ func (c *StateCreator) Parse(content []byte, baseDir, file string) (*HelmState,
}
}
// TODO: Remove this function once Helmfile v0.x
if len(state.DeprecatedReleases) > 0 {
if len(state.Releases) > 0 {
return nil, fmt.Errorf("failed to parse %s: you can't specify both `charts` and `releases` sections", file)
@@ -116,6 +117,7 @@ func (c *StateCreator) Parse(content []byte, baseDir, file string) (*HelmState,
state.DeprecatedReleases = []ReleaseSpec{}
}
// TODO: Remove this function once Helmfile v0.x
if state.DeprecatedContext != "" && state.HelmDefaults.KubeContext == "" {
state.HelmDefaults.KubeContext = state.DeprecatedContext
}