Skip to content
Merged
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ Examples:
Flags:
-h, --help help for upgrade
--detailed-exitcode return a non-zero exit code when there are changes
--post-renderer string the path to an executable to be used for post rendering. If it exists in $PATH, the binary will be used, otherwise it will try to look for the executable at the given path
--reset-values reset the values to the ones built into the chart and merge in any new values
--reuse-values reuse the last release's values and merge in any new values
--set stringArray set values on the command line (can specify multiple or separate values with commas: key1=val1,key2=val2)
Expand Down
3 changes: 3 additions & 0 deletions cmd/helm3.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,9 @@ func (d *diffCmd) template(isUpgrade bool) ([]byte, error) {
if d.namespace != "" {
flags = append(flags, "--namespace", d.namespace)
}
if d.postRenderer != "" {
flags = append(flags, "--post-renderer", d.postRenderer)
}
// Helm automatically enable --reuse-values when there's no --set, --set-string, --set-values, --set-file present.
// Let's simulate that in helm-diff.
// See https://medium.com/@kcatstack/understand-helm-upgrade-flags-reset-values-reuse-values-6e58ac8f127e
Expand Down
2 changes: 2 additions & 0 deletions cmd/upgrade.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ type diffCmd struct {
suppressedKinds []string
outputContext int
showSecrets bool
postRenderer string
}

const globalUsage = `Show a diff explaining what a helm upgrade would change.
Expand Down Expand Up @@ -96,6 +97,7 @@ func newChartCommand() *cobra.Command {
f.BoolVar(&diff.devel, "devel", false, "use development versions, too. Equivalent to version '>0.0.0-0'. If --version is set, this is ignored.")
f.StringArrayVar(&diff.suppressedKinds, "suppress", []string{}, "allows suppression of the values listed in the diff output")
f.IntVarP(&diff.outputContext, "context", "C", -1, "output NUM lines of context around changes")
f.StringVar(&diff.postRenderer, "post-renderer", "", "the path to an executable to be used for post rendering. If it exists in $PATH, the binary will be used, otherwise it will try to look for the executable at the given path")
if !isHelm3() {
f.StringVar(&diff.namespace, "namespace", "default", "namespace to assume the release to be installed into")
}
Expand Down