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:
Soh Takada
2023-04-16 07:05:23 +08:00
committed by GitHub
parent 0012e7e5a1
commit a8a0a33c33
7 changed files with 93 additions and 13 deletions
+1
View File
@@ -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)
})
+10
View File
@@ -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
+1
View File
@@ -208,6 +208,7 @@ type TemplateConfigProvider interface {
SkipTests() bool
OutputDir() string
IncludeCRDs() bool
KubeVersion() string
DAGConfig