diff --git a/pkg/trait/camel.go b/pkg/trait/camel.go index 29f66b203a..7cfbc9d033 100644 --- a/pkg/trait/camel.go +++ b/pkg/trait/camel.go @@ -23,6 +23,7 @@ import ( "os" "path" "regexp" + "strings" "github.com/apache/camel-k/pkg/apis/camel/v1alpha1" "github.com/apache/camel-k/pkg/util/camel" @@ -89,7 +90,10 @@ func (t *camelTrait) Apply(e *Environment) error { return err } - cx := v1alpha1.NewCamelCatalogWithSpecs(ns, "camel-catalog-"+cv, c.CamelCatalogSpec) + // sanitize catalog name + catalogName := "camel-catalog-" + strings.ToLower(cv) + + cx := v1alpha1.NewCamelCatalogWithSpecs(ns, catalogName, c.CamelCatalogSpec) cx.Labels = make(map[string]string) cx.Labels["app"] = "camel-k" cx.Labels["camel.apache.org/catalog.version"] = cv