Skip to content

Commit

Permalink
use correct namespace with sample templates
Browse files Browse the repository at this point in the history
  • Loading branch information
sanchezl committed Oct 21, 2022
1 parent e8ee378 commit 78d044e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pkg/helpers/newapp/cmd/newapp.go
Expand Up @@ -567,7 +567,10 @@ func (c *AppConfig) buildTemplates(components app.ComponentReferences, parameter
name := ""
for _, ref := range components {
tpl := ref.Input().ResolvedMatch.Template

if len(tpl.Namespace) > 0 && tpl.Namespace != c.OriginNamespace {
// if set, template namespace must match the namespace it will be processed in.
tpl.Namespace = c.OriginNamespace
}
klog.V(4).Infof("processing template %s/%s", c.OriginNamespace, tpl.Name)
if len(c.ContextDir) > 0 {
return "", nil, fmt.Errorf("--context-dir is not supported when using a template")
Expand Down

0 comments on commit 78d044e

Please sign in to comment.