Skip to content

Commit 5c235e3

Browse files
authored
Injector should log retryable k8s api errors at Info (#977)
* Injector should log retryable k8s api errors at Info
1 parent 1d6f52f commit 5c235e3

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

cli/injector/main.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -889,7 +889,12 @@ func handleMetricError(err error) {
889889
// retryNotifyHandler is called when the cleanup fails
890890
// it logs the error and the time to wait before the next retry
891891
func retryNotifyHandler(err error, delay time.Duration) {
892-
log.Errorw("disruption cleanup failed", "error", err)
892+
if v1beta1.IsUpdateConflictError(err) {
893+
log.Infow("a retryable error occurred during disruption cleanup", "error", err)
894+
} else {
895+
log.Errorw("disruption cleanup failed", "error", err)
896+
}
897+
893898
log.Infof("retrying cleanup in %s", delay.String())
894899
}
895900

0 commit comments

Comments
 (0)