77 "os"
88 "strings"
99
10- "log"
11-
1210 corev1 "k8s.io/api/core/v1"
1311 "ocm.software/ocm/api/ocm"
1412 "ocm.software/ocm/api/ocm/extensions/accessmethods/helm"
@@ -19,6 +17,7 @@ import (
1917 "ocm.software/ocm/api/tech/oci/identity"
2018 "ocm.software/ocm/api/utils/accessobj"
2119 "sigs.k8s.io/controller-runtime/pkg/client"
20+ "sigs.k8s.io/controller-runtime/pkg/log"
2221
2322 "github.com/openmcp-project/control-plane-operator/api/v1beta1"
2423)
@@ -121,7 +120,9 @@ func GetOCMLocalRepo(ocmRegistry []byte, prefixFilter string) (ocm.Repository, [
121120//
122121// The prefixFilter must be specified as it will be cut off every componentName in the end
123122// so the resulting Component names are without it.
124- func GetOCMComponentsWithVersions (repo ocm.Repository , components []string , prefixFilter string ) ([]v1beta1.Component , error ) {
123+ func GetOCMComponentsWithVersions (ctx context.Context , repo ocm.Repository , components []string , prefixFilter string ) ([]v1beta1.Component , error ) {
124+ log := log .FromContext (ctx )
125+
125126 octx := ocm .DefaultContext ()
126127
127128 var componentList = make ([]v1beta1.Component , 0 , len (components ))
@@ -154,7 +155,7 @@ func GetOCMComponentsWithVersions(repo ocm.Repository, components []string, pref
154155
155156 resources := cva .GetResources ()
156157 if len (resources ) == 0 {
157- log .Printf ("Skipping component version %s of %s: no resources found\n " , version , componentName )
158+ log .Info ("Skipping component version %s of %s: no resources found\n " , version , componentName )
158159 continue // We skip releasechannel component versions which dont have any resources
159160 }
160161
0 commit comments