diff --git a/pkg/templatelookup/regular.go b/pkg/templatelookup/regular.go index c5b3f0c047..f1936f70f2 100644 --- a/pkg/templatelookup/regular.go +++ b/pkg/templatelookup/regular.go @@ -11,6 +11,7 @@ import ( "github.com/kyma-project/lifecycle-manager/api/shared" "github.com/kyma-project/lifecycle-manager/api/v1beta2" + "github.com/kyma-project/lifecycle-manager/internal/descriptor/provider" "github.com/kyma-project/lifecycle-manager/internal/remote" "github.com/kyma-project/lifecycle-manager/pkg/log" @@ -47,7 +48,7 @@ type ModuleTemplatesByModuleName map[string]*ModuleTemplateInfo func (t *TemplateLookup) GetRegularTemplates(ctx context.Context, kyma *v1beta2.Kyma) ModuleTemplatesByModuleName { templates := make(ModuleTemplatesByModuleName) - for _, module := range FindAvailableModules(kyma) { + for _, module := range FetchModuleStatusInfo(kyma) { _, found := templates[module.Name] if found { continue @@ -92,7 +93,7 @@ func (t *TemplateLookup) GetRegularTemplates(ctx context.Context, kyma *v1beta2. } func (t *TemplateLookup) PopulateModuleTemplateInfo(ctx context.Context, - module AvailableModule, namespace, kymaChannel string, moduleReleaseMeta *v1beta2.ModuleReleaseMeta, + module ModuleStatusInfo, namespace, kymaChannel string, moduleReleaseMeta *v1beta2.ModuleReleaseMeta, ) ModuleTemplateInfo { if moduleReleaseMeta == nil { return t.populateModuleTemplateInfoWithoutModuleReleaseMeta(ctx, module, kymaChannel) @@ -102,7 +103,7 @@ func (t *TemplateLookup) PopulateModuleTemplateInfo(ctx context.Context, } func (t *TemplateLookup) populateModuleTemplateInfoWithoutModuleReleaseMeta(ctx context.Context, - module AvailableModule, kymaChannel string, + module ModuleStatusInfo, kymaChannel string, ) ModuleTemplateInfo { var templateInfo ModuleTemplateInfo if module.IsInstalledByVersion() { @@ -114,7 +115,7 @@ func (t *TemplateLookup) populateModuleTemplateInfoWithoutModuleReleaseMeta(ctx } func (t *TemplateLookup) populateModuleTemplateInfoUsingModuleReleaseMeta(ctx context.Context, - module AvailableModule, + module ModuleStatusInfo, moduleReleaseMeta *v1beta2.ModuleReleaseMeta, kymaChannel, namespace string, ) ModuleTemplateInfo { var templateInfo ModuleTemplateInfo