Skip to content

Commit ef973d8

Browse files
committed
log certificate creation only if changes occured
1 parent 2fdbd1a commit ef973d8

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

internal/certificates/manage_libvirt.go

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,10 +108,13 @@ func EnsureCertificate(ctx context.Context, c client.Client, host string) error
108108
}
109109
return nil
110110
})
111+
111112
if err != nil {
112113
return err
113-
} else {
114-
log.Info("Certificate created or updated", "update", update)
114+
}
115+
116+
if update != controllerutil.OperationResultNone {
117+
log.Info(fmt.Sprintf("Certificate %s %s", certName, update))
115118
}
116119

117120
return nil

0 commit comments

Comments
 (0)