Skip to content

FLAG: allow option for chart version #39

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ var Version = "HEAD"
type diffCmd struct {
release string
chart string
chartVersion string
client helm.Interface
valueFiles valueFiles
values []string
Expand Down Expand Up @@ -77,14 +78,15 @@ func main() {
f.BoolVar(&diff.reuseValues, "reuse-values", false, "reuse the last release's values and merge in any new values")
f.BoolVar(&diff.resetValues, "reset-values", false, "reset the values to the ones built into the chart and merge in any new values")
f.StringArrayVar(&diff.suppressedKinds, "suppress", []string{}, "allows suppression of the values listed in the diff output")
f.StringVarP(&diff.chartVersion, "chartVersion", "c", "", "specify the exact chart version evaluate. Similar to `helm install --version`")

if err := cmd.Execute(); err != nil {
os.Exit(1)
}
}

func (d *diffCmd) run() error {
chartPath, err := locateChartPath(d.chart, "", false, "")
chartPath, err := locateChartPath(d.chart, d.chartVersion, false, "")
if err != nil {
return err
}
Expand Down