update the Condition Message for IncorrectCertificate

Signed-off-by: Tim Ramlot <42113979+inteon@users.noreply.github.com>
This commit is contained in:
Tim Ramlot 2023-10-17 17:43:26 +02:00
parent b6ba4ded86
commit c51b23497d
No known key found for this signature in database
GPG Key ID: 47428728E0C2878D
2 changed files with 2 additions and 2 deletions

View File

@ -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
}

View File

@ -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,
},
}