diff --git a/cmd/kyma/alpha/create/module/module.go b/cmd/kyma/alpha/create/module/module.go index d874e4cdd..0993cc8ee 100644 --- a/cmd/kyma/alpha/create/module/module.go +++ b/cmd/kyma/alpha/create/module/module.go @@ -423,11 +423,13 @@ func (cmd *command) Run(cobraCmd *cobra.Command) error { cmd.NewStep("Generating module template...") var resourceName = "" mandatoryModule := false + enableModuleConfig := false var channel = cmd.opts.Channel if modCnf != nil { resourceName = modCnf.ResourceName channel = modCnf.Channel mandatoryModule = modCnf.Mandatory + enableModuleConfig = modCnf.EnableModuleConfig } var namespace = cmd.opts.Namespace @@ -440,7 +442,7 @@ func (cmd *command) Run(cobraCmd *cobra.Command) error { annotations := cmd.getModuleTemplateAnnotations(modCnf, crd) template, err := module.Template(componentVersionAccess, resourceName, namespace, - channel, modDef.DefaultCR, labels, annotations, modDef.CustomStateChecks, mandatoryModule) + channel, modDef.DefaultCR, labels, annotations, modDef.CustomStateChecks, mandatoryModule, enableModuleConfig) if err != nil { cmd.CurrentStep.Failure() return err diff --git a/pkg/module/template.go b/pkg/module/template.go index 1dd8426d7..7d4edff96 100644 --- a/pkg/module/template.go +++ b/pkg/module/template.go @@ -88,15 +88,16 @@ func Template(remote ocm.ComponentVersionAccess, moduleTemplateName, namespace, resourceName = shortName + "-" + channel } td := moduleTemplateData{ - ResourceName: resourceName, - Namespace: namespace, - Descriptor: cva, - Channel: channel, - Data: string(data), - Labels: labels, - Annotations: annotations, - CustomStateChecks: customsStateChecks, - Mandatory: mandatory, + ResourceName: resourceName, + Namespace: namespace, + Descriptor: cva, + Channel: channel, + Data: string(data), + Labels: labels, + Annotations: annotations, + CustomStateChecks: customsStateChecks, + Mandatory: mandatory, + EnableModuleConfig: enableModuleConfig, } t, err := template.New("modTemplate").Funcs(template.FuncMap{