Fix handling of pods having DeletionTimestamp set (#7119) (#7131)

Signed-off-by: Bartosz Borkowski <bartebor@wp.pl>
Co-authored-by: Bartosz Borkowski <bartosz.borkowski@grupawp.pl>
This commit is contained in:
Bartosz Borkowski
2025-03-24 15:31:24 +01:00
committed by GitHub
parent 77516a6bc2
commit 7c76d534d3
2 changed files with 76 additions and 0 deletions

View File

@@ -40,6 +40,9 @@ func DefaultProcessor(convert ToFunc, recordLatency *EndpointLatencyRecorder) Pr
case cache.Sync, cache.Added, cache.Updated:
obj, err := convert(d.Object.(meta.Object))
if err != nil {
if err == errPodTerminating {
continue
}
return err
}
if old, exists, err := clientState.Get(obj); err == nil && exists {