Skip to content

Commit d42b177

Browse files
authored
Allow passing the chart repo to helm template (#268)
Resolves #277
1 parent 0882d8c commit d42b177

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

cmd/helm3.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,9 @@ func (d *diffCmd) template(isUpgrade bool) ([]byte, error) {
9292
if d.chartVersion != "" {
9393
flags = append(flags, "--version", d.chartVersion)
9494
}
95+
if d.chartRepo != "" {
96+
flags = append(flags, "--repo", d.chartRepo)
97+
}
9598
if d.namespace != "" {
9699
flags = append(flags, "--namespace", d.namespace)
97100
}

cmd/upgrade.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ type diffCmd struct {
1717
release string
1818
chart string
1919
chartVersion string
20+
chartRepo string
2021
client helm.Interface
2122
detailedExitCode bool
2223
devel bool
@@ -96,6 +97,7 @@ func newChartCommand() *cobra.Command {
9697
var kubeconfig string
9798
f.StringVar(&kubeconfig, "kubeconfig", "", "This flag is ignored, to allow passing of this top level flag to helm")
9899
f.StringVar(&diff.chartVersion, "version", "", "specify the exact chart version to use. If this is not specified, the latest version is used")
100+
f.StringVar(&diff.chartRepo, "repo", "", "specify the chart repository url to locate the requested chart")
99101
f.BoolVar(&diff.detailedExitCode, "detailed-exitcode", false, "return a non-zero exit code when there are changes")
100102
f.BoolP("suppress-secrets", "q", false, "suppress secrets in the output")
101103
f.BoolVar(&diff.showSecrets, "show-secrets", false, "do not redact secret values in the output")

0 commit comments

Comments
 (0)