Merge pull request #5737 from adamreese/v3/release-namespace

fix(pkg/action): add namespace to release options
pull/5802/head v3.0.0-alpha.1
Adam Reese 5 years ago committed by GitHub
commit b9a54967f8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -122,6 +122,7 @@ func (i *Install) Run(chrt *chart.Chart) (*release.Release, error) {
options := chartutil.ReleaseOptions{
Name: i.ReleaseName,
Namespace: i.Namespace,
IsInstall: true,
}
valuesToRender, err := chartutil.ToRenderValues(chrt, i.rawValues, options, caps)

@ -146,6 +146,7 @@ func (u *Upgrade) prepareUpgrade(name string, chart *chart.Chart) (*release.Rele
options := chartutil.ReleaseOptions{
Name: name,
Namespace: currentRelease.Namespace,
IsUpgrade: true,
}

@ -367,6 +367,7 @@ func CoalesceTables(dst, src map[string]interface{}) map[string]interface{} {
// for the composition of the final values struct
type ReleaseOptions struct {
Name string
Namespace string
IsUpgrade bool
IsInstall bool
}
@ -383,6 +384,7 @@ func ToRenderValues(chrt *chart.Chart, chrtVals map[string]interface{}, options
"Capabilities": caps,
"Release": map[string]interface{}{
"Name": options.Name,
"Namespace": options.Namespace,
"IsUpgrade": options.IsUpgrade,
"IsInstall": options.IsInstall,
"Service": "Helm",

@ -50,7 +50,10 @@ func Templates(linter *support.Linter, values map[string]interface{}, namespace
return
}
options := chartutil.ReleaseOptions{Name: "testRelease"}
options := chartutil.ReleaseOptions{
Name: "testRelease",
Namespace: namespace,
}
cvals, err := chartutil.CoalesceValues(chart, values)
if err != nil {

Loading…
Cancel
Save