diff --git a/pkg/cmd/version.go b/pkg/cmd/version.go index ee2ac25230..4cc93085c3 100644 --- a/pkg/cmd/version.go +++ b/pkg/cmd/version.go @@ -19,7 +19,6 @@ package cmd import ( "context" - "errors" "fmt" v1 "github.com/apache/camel-k/v2/pkg/apis/camel/v1" @@ -153,19 +152,12 @@ func operatorInfo(ctx context.Context, c client.Client, namespace string) (map[s if err != nil { return nil, err } - if catalog == nil { - msg := fmt.Sprintf("CamelCatalog version: %s", platform.Status.Build.RuntimeVersion) - if platform.Status.Build.RuntimeProvider != "" { - msg += fmt.Sprintf(", provider: %s", platform.Status.Build.RuntimeProvider) - } - msg += fmt.Sprintf(" can't be found in %s namespace", platform.Namespace) - return nil, errors.New(msg) + if catalog != nil { + infos["Camel Quarkus version"] = catalog.CamelCatalogSpec.Runtime.Metadata["camel-quarkus.version"] + infos["Camel version"] = catalog.CamelCatalogSpec.Runtime.Metadata["camel.version"] + infos["Quarkus version"] = catalog.CamelCatalogSpec.Runtime.Metadata["quarkus.version"] } - infos["Camel Quarkus version"] = catalog.CamelCatalogSpec.Runtime.Metadata["camel-quarkus.version"] - infos["Camel version"] = catalog.CamelCatalogSpec.Runtime.Metadata["camel.version"] - infos["Quarkus version"] = catalog.CamelCatalogSpec.Runtime.Metadata["quarkus.version"] - return infos, nil } diff --git a/pkg/controller/catalog/initialize.go b/pkg/controller/catalog/initialize.go index 83553cbe3d..cb3d987b70 100644 --- a/pkg/controller/catalog/initialize.go +++ b/pkg/controller/catalog/initialize.go @@ -150,6 +150,9 @@ func initializeSpectrum(options spectrum.Options, ip *v1.IntegrationPlatform, ca options.Target = imageName err := buildRuntimeBuilderWithTimeoutSpectrum(options, ip.Status.Build.GetBuildCatalogToolTimeout().Duration) + if err != nil { + Log.Error(err, "Error trying to build Camel K builder container") + } if err != nil { target.Status.Phase = v1.CamelCatalogPhaseError