Skip to content

Commit

Permalink
Merge pull request #7319 from lcrisci/fix-template-clustername-behavior
Browse files Browse the repository at this point in the history
Fix template clusterName behavior
  • Loading branch information
k8s-ci-robot committed Jan 28, 2020
2 parents e56c507 + 970c978 commit b962354
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion cmd/kops/toolbox_template.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,14 @@ func runToolBoxTemplate(f *util.Factory, out io.Writer, options *toolboxTemplate
if err != nil {
return err
}
context["clusterName"] = options.clusterName

// @step: set clusterName from template's values or cli flag
value, ok := context["clusterName"].(string)
if ok {
options.clusterName = value
} else {
context["clusterName"] = options.clusterName
}

// @check if we are just rendering the config value
if options.configValue != "" {
Expand Down

0 comments on commit b962354

Please sign in to comment.