From 0ab88434184d67d876148072ffa7646e58dcf5dc Mon Sep 17 00:00:00 2001 From: Dario Tranchitella Date: Mon, 14 Jul 2025 13:38:09 +0200 Subject: [PATCH] feat(chore): support for customising container repository via ldflags (#873) Signed-off-by: Dario Tranchitella --- cmd/manager/cmd.go | 2 +- internal/version.go | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/cmd/manager/cmd.go b/cmd/manager/cmd.go index 83613df..efb6d44 100644 --- a/cmd/manager/cmd.go +++ b/cmd/manager/cmd.go @@ -306,7 +306,7 @@ func NewCmd(scheme *runtime.Scheme) *cobra.Command { cmd.Flags().StringVar(&tmpDirectory, "tmp-directory", "/tmp/kamaji", "Directory which will be used to work with temporary files.") cmd.Flags().StringVar(&kineImage, "kine-image", "rancher/kine:v0.11.10-amd64", "Container image along with tag to use for the Kine sidecar container (used only if etcd-storage-type is set to one of kine strategies).") cmd.Flags().StringVar(&datastore, "datastore", "", "Optional, the default DataStore that should be used by Kamaji to setup the required storage of Tenant Control Planes with undeclared DataStore.") - cmd.Flags().StringVar(&migrateJobImage, "migrate-image", fmt.Sprintf("clastix/kamaji:%s", internal.GitTag), "Specify the container image to launch when a TenantControlPlane is migrated to a new datastore.") + cmd.Flags().StringVar(&migrateJobImage, "migrate-image", fmt.Sprintf("%s/clastix/kamaji:%s", internal.ContainerRepository, internal.GitTag), "Specify the container image to launch when a TenantControlPlane is migrated to a new datastore.") cmd.Flags().IntVar(&maxConcurrentReconciles, "max-concurrent-tcp-reconciles", 1, "Specify the number of workers for the Tenant Control Plane controller (beware of CPU consumption)") cmd.Flags().StringVar(&managerNamespace, "pod-namespace", os.Getenv("POD_NAMESPACE"), "The Kubernetes Namespace on which the Operator is running in, required for the TenantControlPlane migration jobs.") cmd.Flags().StringVar(&managerServiceName, "webhook-service-name", "kamaji-webhook-service", "The Kamaji webhook server Service name which is used to get validation webhooks, required for the TenantControlPlane migration jobs.") diff --git a/internal/version.go b/internal/version.go index 337d181..8d1799d 100644 --- a/internal/version.go +++ b/internal/version.go @@ -4,6 +4,8 @@ package internal var ( + ContainerRepository = "docker.io" + GitRepo = "" GitTag = "dev" GitCommit = ""