Skip to content

Commit b41f41a

Browse files
authored
fix(updater): defer delete instance should not be counted as update (#6396) (#6399)
1 parent a5f6e68 commit b41f41a

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

pkg/updater/builder.go

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -162,10 +162,13 @@ func split[R runtime.Instance](all []R, rev string) (update, outdated, deleted [
162162
if !instance.GetDeletionTimestamp().IsZero() {
163163
continue
164164
}
165+
if _, ok := instance.GetAnnotations()[v1alpha1.AnnoKeyDeferDelete]; ok {
166+
deleted = append(deleted, instance)
167+
continue
168+
}
169+
165170
if instance.GetUpdateRevision() == rev {
166171
update = append(update, instance)
167-
} else if _, ok := instance.GetAnnotations()[v1alpha1.AnnoKeyDeferDelete]; ok {
168-
deleted = append(deleted, instance)
169172
} else {
170173
outdated = append(outdated, instance)
171174
}

0 commit comments

Comments
 (0)