From 84995167d6a76f7ad8dd0f7426737488cae7ed36 Mon Sep 17 00:00:00 2001 From: Mike Danese Date: Wed, 2 Dec 2020 10:58:22 -0800 Subject: [PATCH] hoist error message change in token registry to noderestriction The token registry error message was changed in 5eefd7d012a560c67750a6a57320d7c5ee107f63 to exclude some object details. This error comes from noderestriction under some circumstances. Let's make sure they match. Change-Id: If9240f5c1a131d27dce389e2c6eca6c33d681f3b --- plugin/pkg/admission/noderestriction/admission.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin/pkg/admission/noderestriction/admission.go b/plugin/pkg/admission/noderestriction/admission.go index 23a379086ac..326165ddd3f 100644 --- a/plugin/pkg/admission/noderestriction/admission.go +++ b/plugin/pkg/admission/noderestriction/admission.go @@ -535,7 +535,7 @@ func (p *Plugin) admitServiceAccount(nodeName string, a admission.Attributes) er return admission.NewForbidden(a, err) } if ref.UID != pod.UID { - return admission.NewForbidden(a, fmt.Errorf("the UID in the bound object reference (%s) does not match the UID in record (%s). The object might have been deleted and then recreated", ref.UID, pod.UID)) + return admission.NewForbidden(a, fmt.Errorf("the UID in the bound object reference (%s) does not match the UID in record. The object might have been deleted and then recreated", ref.UID)) } if pod.Spec.NodeName != nodeName { return admission.NewForbidden(a, fmt.Errorf("node requested token bound to a pod scheduled on a different node"))