Skip to content

Commit 3df938a

Browse files
njamdatabus23
authored andcommitted
Add "--reset-values" flag
Closes #25
1 parent 7270cac commit 3df938a

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

main.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ type diffCmd struct {
3030
valueFiles valueFiles
3131
values []string
3232
reuseValues bool
33+
resetValues bool
3334
suppressedKinds []string
3435
}
3536

@@ -74,6 +75,7 @@ func main() {
7475
f.VarP(&diff.valueFiles, "values", "f", "specify values in a YAML file (can specify multiple)")
7576
f.StringArrayVar(&diff.values, "set", []string{}, "set values on the command line (can specify multiple or separate values with commas: key1=val1,key2=val2)")
7677
f.BoolVar(&diff.reuseValues, "reuse-values", false, "reuse the last release's values and merge in any new values")
78+
f.BoolVar(&diff.resetValues, "reset-values", false, "reset the values to the ones built into the chart and merge in any new values")
7779
f.StringArrayVar(&diff.suppressedKinds, "suppress", []string{}, "allows suppression of the values listed in the diff output")
7880

7981
if err := cmd.Execute(); err != nil {
@@ -103,6 +105,7 @@ func (d *diffCmd) run() error {
103105
chartPath,
104106
helm.UpdateValueOverrides(rawVals),
105107
helm.ReuseValues(d.reuseValues),
108+
helm.ResetValues(d.resetValues),
106109
helm.UpgradeDryRun(true),
107110
)
108111
if err != nil {

0 commit comments

Comments
 (0)