From 6e1a820f9413aceb76f9b86d4953ccfd5dbee71c Mon Sep 17 00:00:00 2001 From: Rui Vieira Date: Fri, 14 Feb 2025 12:44:00 +0000 Subject: [PATCH] fix(guardrails): Get orchestrator image from operator's config map --- controllers/gorch/constants.go | 2 +- controllers/gorch/deployment.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/controllers/gorch/constants.go b/controllers/gorch/constants.go index 778481d1..2511b04d 100644 --- a/controllers/gorch/constants.go +++ b/controllers/gorch/constants.go @@ -4,7 +4,7 @@ const ( orchestratorName = "guardrails-orchestrator" finalizerName = "trustyai.opendatahub.io/gorch-finalizer" configMapName = "gorch-config" - orchestratorImageKey = "guardrailsOrchestratorImage" + orchestratorImageKey = "guardrails-orchestrator-image" vllmGatewayImageKey = "vllmGatewayImage" regexDetectorImageKey = "regexDetectorImage" ServiceName = "GORCH" diff --git a/controllers/gorch/deployment.go b/controllers/gorch/deployment.go index 7d017813..afd54d1c 100644 --- a/controllers/gorch/deployment.go +++ b/controllers/gorch/deployment.go @@ -37,7 +37,7 @@ type DeploymentConfig struct { func (r *GuardrailsOrchestratorReconciler) createDeployment(ctx context.Context, orchestrator *gorchv1alpha1.GuardrailsOrchestrator) *appsv1.Deployment { var containerImages ContainerImages // Get orchestrator image - orchestratorImage, err := r.getImageFromConfigMap(ctx, orchestratorImageKey, constants.ConfigMap, orchestrator.Namespace) + orchestratorImage, err := r.getImageFromConfigMap(ctx, orchestratorImageKey, constants.ConfigMap, r.Namespace) if orchestratorImage == "" || err != nil { log.FromContext(ctx).Error(err, "Error getting container image from ConfigMap.") }