From 44f69ce015a636566fb8aaedca3dd998a407ee6c Mon Sep 17 00:00:00 2001 From: Matt Turner Date: Thu, 7 Jan 2021 19:21:11 +0000 Subject: [PATCH] Minor log message clarification Supplying just a name, rather than a namespace/name, for a cainjector source reference, results in the generic error message "invalid certificate name". This condition is detected on its own branch so we can be more specific. Signed-off-by: Matt Turner --- pkg/controller/cainjector/sources.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/controller/cainjector/sources.go b/pkg/controller/cainjector/sources.go index 8f2c1e85f..bbf22db96 100644 --- a/pkg/controller/cainjector/sources.go +++ b/pkg/controller/cainjector/sources.go @@ -104,7 +104,7 @@ func (c *certificateDataSource) ReadCA(ctx context.Context, log logr.Logger, met certName := splitNamespacedName(certNameRaw) log = log.WithValues("certificate", certName) if certName.Namespace == "" { - log.Error(nil, "invalid certificate name") + log.Error(nil, "invalid certificate name; needs a namespace/ prefix") // don't return an error, requeuing won't help till this is changed return nil, nil }