diff --git a/pkg/services/cleanup/cleanup.go b/pkg/services/cleanup/cleanup.go index efc4957377f..ade5c888590 100644 --- a/pkg/services/cleanup/cleanup.go +++ b/pkg/services/cleanup/cleanup.go @@ -2,6 +2,7 @@ package cleanup import ( "context" + "errors" "io/ioutil" "os" "path" @@ -67,7 +68,7 @@ func (srv *CleanUpService) Run(ctx context.Context) error { func (srv *CleanUpService) cleanUpOldAnnotations(ctx context.Context) { cleaner := annotations.GetAnnotationCleaner() affected, affectedTags, err := cleaner.CleanAnnotations(ctx, srv.Cfg) - if err != nil { + if err != nil && !errors.Is(err, context.DeadlineExceeded) { srv.log.Error("failed to clean up old annotations", "error", err) } else { srv.log.Debug("Deleted excess annotations", "annotations affected", affected, "annotation tags affected", affectedTags)