Skip to content

Commit c694916

Browse files
committed
feat: Add support for the non-default namespace for the targeted release
Resolves #66
1 parent c17ec6b commit c694916

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
@@ -18,6 +18,7 @@ type diffCmd struct {
1818
chartVersion string
1919
client helm.Interface
2020
detailedExitCode bool
21+
namespace string // namespace to assume the release to be installed into. Defaults to the current kube config namespace.
2122
valueFiles valueFiles
2223
values []string
2324
reuseValues bool
@@ -77,6 +78,7 @@ func newChartCommand() *cobra.Command {
7778
f.BoolVar(&diff.allowUnreleased, "allow-unreleased", false, "enables diffing of releases that are not yet deployed via Helm")
7879
f.StringArrayVar(&diff.suppressedKinds, "suppress", []string{}, "allows suppression of the values listed in the diff output")
7980
f.IntVarP(&diff.outputContext, "context", "C", -1, "output NUM lines of context around changes")
81+
f.StringVar(&diff.namespace, "namespace", "default", "namespace to assume the release to be installed into")
8082

8183
addCommonCmdOptions(f)
8284

@@ -121,7 +123,7 @@ func (d *diffCmd) run() error {
121123
if newInstall {
122124
installResponse, err := d.client.InstallRelease(
123125
chartPath,
124-
"default",
126+
d.namespace,
125127
helm.ReleaseName(d.release),
126128
helm.ValueOverrides(rawVals),
127129
helm.InstallDryRun(true),

0 commit comments

Comments
 (0)