Skip to content

Commit 5981193

Browse files
use friendly language for cert doesn't exist message
1 parent c0606c9 commit 5981193

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

internal/controller/httpproxy_controller.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1133,7 +1133,14 @@ func getCertificateReadyConditionReason(certificate *unstructured.Unstructured)
11331133
switch reason {
11341134
case "InvalidCertificate", "CertificateRequestFailed":
11351135
return networkingv1alpha.CertificateReadyReasonProvisioningFailed, message
1136+
case "DoesNotExist":
1137+
// cert-manager: "Issuing certificate as Secret does not exist" — normal during first issuance
1138+
return networkingv1alpha.CertificateReadyReasonPending, "We're provisioning and applying a certificate to this hostname - it may take a few minutes"
11361139
default:
1140+
// Translate raw cert-manager message when it's the "Secret does not exist" issuance message
1141+
if strings.Contains(message, "Issuing certificate as Secret does not exist") {
1142+
return networkingv1alpha.CertificateReadyReasonPending, "We're provisioning and applying a certificate to this hostname - it may take a few minutes"
1143+
}
11371144
return networkingv1alpha.CertificateReadyReasonPending, message
11381145
}
11391146
}

0 commit comments

Comments
 (0)