From 760c1394d51bb6ab76fb0e006764ddef989be29b Mon Sep 17 00:00:00 2001 From: Pasquale Congiusti Date: Tue, 4 Jul 2023 15:47:32 +0200 Subject: [PATCH] fix(ctrl): dynamic builder registry organization Closes #4525 --- pkg/controller/catalog/initialize.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pkg/controller/catalog/initialize.go b/pkg/controller/catalog/initialize.go index 0ab5472434..5d1ec67f8b 100644 --- a/pkg/controller/catalog/initialize.go +++ b/pkg/controller/catalog/initialize.go @@ -102,9 +102,14 @@ func (action *initializeAction) Handle(ctx context.Context, catalog *v1.CamelCat func initializeSpectrum(options spectrum.Options, ip *v1.IntegrationPlatform, catalog *v1.CamelCatalog) (*v1.CamelCatalog, error) { target := catalog.DeepCopy() + organization := ip.Status.Build.Registry.Organization + if organization == "" { + organization = catalog.Namespace + } imageName := fmt.Sprintf( - "%s/camel-k-runtime-%s-builder:%s", + "%s/%s/camel-k-runtime-%s-builder:%s", ip.Status.Build.Registry.Address, + organization, catalog.Spec.Runtime.Provider, strings.ToLower(catalog.Spec.Runtime.Version), )