Skip to content

Commit a536dfc

Browse files
committed
Allow specifying the chart version when running diff upgrade
1 parent e21ba66 commit a536dfc

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

cmd/upgrade.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import (
1313
type diffCmd struct {
1414
release string
1515
chart string
16+
chartVersion string
1617
client helm.Interface
1718
valueFiles valueFiles
1819
values []string
@@ -60,6 +61,7 @@ func newChartCommand() *cobra.Command {
6061
}
6162

6263
f := cmd.Flags()
64+
f.StringVar(&diff.chartVersion, "version", "", "specify the exact chart version to use. If this is not specified, the latest version is used")
6365
f.BoolP("suppress-secrets", "q", false, "suppress secrets in the output")
6466
f.Bool("no-color", false, "remove colors from the output")
6567
f.VarP(&diff.valueFiles, "values", "f", "specify values in a YAML file (can specify multiple)")
@@ -73,7 +75,7 @@ func newChartCommand() *cobra.Command {
7375
}
7476

7577
func (d *diffCmd) run() error {
76-
chartPath, err := locateChartPath(d.chart, "", false, "")
78+
chartPath, err := locateChartPath(d.chart, d.chartVersion, false, "")
7779
if err != nil {
7880
return err
7981
}

0 commit comments

Comments
 (0)