Skip to content

Commit dec4bd6

Browse files
authored
Merge pull request #85 from mumoshu/release-target-namespace
feat: Add support for the non-default namespace for the targeted release
2 parents 06a6441 + c694916 commit dec4bd6

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
stringValues []string
@@ -79,6 +80,7 @@ func newChartCommand() *cobra.Command {
7980
f.BoolVar(&diff.allowUnreleased, "allow-unreleased", false, "enables diffing of releases that are not yet deployed via Helm")
8081
f.StringArrayVar(&diff.suppressedKinds, "suppress", []string{}, "allows suppression of the values listed in the diff output")
8182
f.IntVarP(&diff.outputContext, "context", "C", -1, "output NUM lines of context around changes")
83+
f.StringVar(&diff.namespace, "namespace", "default", "namespace to assume the release to be installed into")
8284

8385
addCommonCmdOptions(f)
8486

@@ -123,7 +125,7 @@ func (d *diffCmd) run() error {
123125
if newInstall {
124126
installResponse, err := d.client.InstallRelease(
125127
chartPath,
126-
"default",
128+
d.namespace,
127129
helm.ReleaseName(d.release),
128130
helm.ValueOverrides(rawVals),
129131
helm.InstallDryRun(true),

0 commit comments

Comments
 (0)