From c51b23497df40af17dcbbdbc2327b32c779d0395 Mon Sep 17 00:00:00 2001 From: Tim Ramlot <42113979+inteon@users.noreply.github.com> Date: Tue, 17 Oct 2023 17:43:26 +0200 Subject: [PATCH] update the Condition Message for IncorrectCertificate Signed-off-by: Tim Ramlot <42113979+inteon@users.noreply.github.com> --- internal/controller/certificates/policies/checks.go | 2 +- internal/controller/certificates/policies/checks_test.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/controller/certificates/policies/checks.go b/internal/controller/certificates/policies/checks.go index ff380af42..0c73e898c 100644 --- a/internal/controller/certificates/policies/checks.go +++ b/internal/controller/certificates/policies/checks.go @@ -178,7 +178,7 @@ func SecretCertificateNameAnnotationsMismatch(input Input) (string, string, bool name, ok := input.Secret.Annotations[cmapi.CertificateNameKey] if (ok) && // only check if an annotation is present name != input.Certificate.Name { - return IncorrectCertificate, fmt.Sprintf("Issuing certificate as Secret was previously issued for %q", name), true + return IncorrectCertificate, fmt.Sprintf("Secret was issued for %q. If this message is not transient, you might have two conflicting Certificates pointing to the same secret.", name), true } return "", "", false } diff --git a/internal/controller/certificates/policies/checks_test.go b/internal/controller/certificates/policies/checks_test.go index cf2207b30..884b653d8 100644 --- a/internal/controller/certificates/policies/checks_test.go +++ b/internal/controller/certificates/policies/checks_test.go @@ -2324,7 +2324,7 @@ func Test_SecretCertificateNameAnnotationsMismatch(t *testing.T) { }, }, expReason: "IncorrectCertificate", - expMessage: "Issuing certificate as Secret was previously issued for \"foo\"", + expMessage: "Secret was issued for \"foo\". If this message is not transient, you might have two conflicting Certificates pointing to the same secret.", expViolation: true, }, }