Skip to content

Commit

Permalink
Update controllers/webhook/isvc_validator.go
Browse files Browse the repository at this point in the history
Co-authored-by: Edgar Hernández <ehernand@redhat.com>
Signed-off-by: Spolti <fspolti@redhat.com>
  • Loading branch information
spolti and israel-hdez committed Nov 28, 2024
1 parent a75c8fc commit cf75304
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions controllers/webhook/isvc_validator.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down

0 comments on commit cf75304

Please sign in to comment.