From cf75304a3abca0e6f3b0329841a55e858f74367d Mon Sep 17 00:00:00 2001 From: Filippe Spolti Date: Thu, 28 Nov 2024 17:17:08 -0300 Subject: [PATCH] Update controllers/webhook/isvc_validator.go MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Edgar Hernández Signed-off-by: Spolti --- controllers/webhook/isvc_validator.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/controllers/webhook/isvc_validator.go b/controllers/webhook/isvc_validator.go index f3418db8..0fa43ef6 100644 --- a/controllers/webhook/isvc_validator.go +++ b/controllers/webhook/isvc_validator.go @@ -75,8 +75,8 @@ func (is *IsvcValidator) Handle(ctx context.Context, req admission.Request) admi for _, ns := range protectedNamespaces { if isvc.Namespace == ns { log.V(1).Info("Namespace is protected, the InferenceService will not be created") - return admission.Denied(fmt.Sprintf("Namespace %s is protected, the InferenceService %s "+ - "will not be created", isvc.Namespace, isvc.Name)) + return admission.Denied(fmt.Sprintf("The InferenceService %s "+ + "cannot be created in protected namespace %s.", isvc.Name, isvc.Namespace)) } } log.Info("Namespace is not protected")