Keyfactor / ejbca-cert-manager-issuer

External issuer for cert-manager for EJBCA
Apache License 2.0
3 stars 3 forks source link

Add statement to log when reconciler changes the status of Issuer or ClusterIssuer resources #4

Closed m8rmclaren closed 1 year ago

m8rmclaren commented 1 year ago

Currently, there is no insight given to users when an Issuer or ClusterIssuer changes status. Add a log statement that notifies the user of changed states:

if ready.Status != conditionStatus {
    log.Info(fmt.Sprintf("Found status change for %s %q: %q -> %q; %q", kind, name, ready.Status, conditionStatus, message))

    ready.Status = conditionStatus
    now := metav1.Now()
    ready.LastTransitionTime = &now
}
ready.Reason = reason
ready.Message = message