Skip to content

Commit 43a3b91

Browse files
authored
Check issuer observed generation (#479)
1 parent f635163 commit 43a3b91

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

utils/reconciler.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -436,7 +436,10 @@ func (r *ReconcilerBase) GenerateCMIssuer(namespace string, prefix string, CACom
436436

437437
for i := range issuer.Status.Conditions {
438438
if issuer.Status.Conditions[i].Type == certmanagerv1.IssuerConditionReady && issuer.Status.Conditions[i].Status == certmanagermetav1.ConditionFalse {
439-
return errors.New("Certificate is not ready")
439+
return errors.New("Certificate Issuer is not ready")
440+
}
441+
if issuer.Status.Conditions[i].Type == certmanagerv1.IssuerConditionReady && issuer.Status.Conditions[i].ObservedGeneration != issuer.ObjectMeta.Generation {
442+
return errors.New("Certificate Issuer is not ready")
440443
}
441444
}
442445
return nil

0 commit comments

Comments
 (0)