mirror of
https://github.com/helmfile/helmfile.git
synced 2026-10-21 06:14:52 +02:00
Add kube version flag (#804)
* add --kube-version flag into template cmd Signed-off-by: FeLvi-zzz <34182539+FeLvi-zzz@users.noreply.github.com> * add test Signed-off-by: FeLvi-zzz <34182539+FeLvi-zzz@users.noreply.github.com> * modify flag description Signed-off-by: FeLvi-zzz <34182539+FeLvi-zzz@users.noreply.github.com> * use switch Signed-off-by: FeLvi-zzz <34182539+FeLvi-zzz@users.noreply.github.com> * add comment Signed-off-by: FeLvi-zzz <34182539+FeLvi-zzz@users.noreply.github.com> --------- Signed-off-by: FeLvi-zzz <34182539+FeLvi-zzz@users.noreply.github.com>
This commit is contained in:
@@ -1884,6 +1884,7 @@ func (a *App) template(r *Run, c TemplateConfigProvider) (bool, []error) {
|
||||
SkipCleanup: c.SkipCleanup(),
|
||||
SkipTests: c.SkipTests(),
|
||||
PostRenderer: c.PostRenderer(),
|
||||
KubeVersion: c.KubeVersion(),
|
||||
}
|
||||
return st.TemplateReleases(helm, c.OutputDir(), c.Values(), args, c.Concurrency(), c.Validate(), opts)
|
||||
})
|
||||
|
||||
@@ -2097,6 +2097,7 @@ type configImpl struct {
|
||||
includeNeeds bool
|
||||
includeTransitiveNeeds bool
|
||||
skipCharts bool
|
||||
kubeVersion string
|
||||
}
|
||||
|
||||
func (c configImpl) Selectors() []string {
|
||||
@@ -2179,6 +2180,10 @@ func (c configImpl) PostRenderer() string {
|
||||
return ""
|
||||
}
|
||||
|
||||
func (c configImpl) KubeVersion() string {
|
||||
return c.kubeVersion
|
||||
}
|
||||
|
||||
type applyConfig struct {
|
||||
args string
|
||||
values []string
|
||||
@@ -2213,6 +2218,7 @@ type applyConfig struct {
|
||||
waitForJobs bool
|
||||
reuseValues bool
|
||||
postRenderer string
|
||||
kubeVersion string
|
||||
|
||||
// template-only options
|
||||
includeCRDs, skipTests bool
|
||||
@@ -2361,6 +2367,10 @@ func (a applyConfig) PostRenderer() string {
|
||||
return a.postRenderer
|
||||
}
|
||||
|
||||
func (a applyConfig) KubeVersion() string {
|
||||
return a.kubeVersion
|
||||
}
|
||||
|
||||
type depsConfig struct {
|
||||
skipRepos bool
|
||||
includeTransitiveNeeds bool
|
||||
|
||||
@@ -208,6 +208,7 @@ type TemplateConfigProvider interface {
|
||||
SkipTests() bool
|
||||
OutputDir() string
|
||||
IncludeCRDs() bool
|
||||
KubeVersion() string
|
||||
|
||||
DAGConfig
|
||||
|
||||
|
||||
Reference in New Issue
Block a user