Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix operator check of the catalog #4741

Merged
merged 1 commit into from
Sep 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 4 additions & 12 deletions pkg/cmd/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ package cmd

import (
"context"
"errors"
"fmt"

v1 "github.com/apache/camel-k/v2/pkg/apis/camel/v1"
Expand Down Expand Up @@ -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
}

Expand Down
1 change: 1 addition & 0 deletions pkg/controller/catalog/initialize.go
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@ func initializeSpectrum(options spectrum.Options, ip *v1.IntegrationPlatform, ca
err := buildRuntimeBuilderWithTimeoutSpectrum(options, ip.Status.Build.GetBuildCatalogToolTimeout().Duration)

if err != nil {
Log.Error(err, "Error trying to build Camel K builder container")
target.Status.Phase = v1.CamelCatalogPhaseError
target.Status.SetErrorCondition(
v1.CamelCatalogConditionReady,
Expand Down
Loading