Skip to content

Commit 54e51b5

Browse files
Liam Bennettroboquat
Liam Bennett
authored andcommitted
Fix the check cert function
1 parent 82015e6 commit 54e51b5

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

.werft/util/certs.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ export async function issueCertificate(werft: Werft, params: IssueCertificatePar
4040
werft.log(shellOpts.slice, `Creating cert: Attempt ${i}`);
4141
createCertificateResource(werft, shellOpts, params, subdomains);
4242
werft.log(shellOpts.slice, `Checking for cert readiness: Attempt ${i}`);
43-
if (checkCertReadiness(params.certName)) {
43+
if (isCertReady(params.certName)) {
4444
certReady = true;
4545
break;
4646
}
@@ -51,13 +51,13 @@ export async function issueCertificate(werft: Werft, params: IssueCertificatePar
5151
return certReady
5252
}
5353

54-
function checkCertReadiness(certName: string): boolean {
54+
function isCertReady(certName: string): boolean {
5555
const timeout = "180s"
5656
const rc = exec(
5757
`kubectl --kubeconfig ${CORE_DEV_KUBECONFIG_PATH} wait --for=condition=Ready --timeout=${timeout} -n certs certificate ${certName}`,
5858
{ dontCheckRc: true },
5959
).code
60-
return rc != 0
60+
return rc == 0
6161
}
6262

6363
function retrieveFailedCertDebug(certName: string, slice: string) {

0 commit comments

Comments
 (0)