Skip to content

Commit

Permalink
fix 4302: avoid repeat deletion of pod
Browse files Browse the repository at this point in the history
Signed-off-by: Jian Wang <w13915984028@gmail.com>
  • Loading branch information
w13915984028 authored and innobead committed Aug 2, 2022
1 parent 43e797e commit 4fa1cc1
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions controller/kubernetes_pod_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -310,6 +310,12 @@ func (kc *KubernetesPodController) handlePodDeletionIfVolumeRequestRemount(pod *
if pod.Status.StartTime == nil {
return nil
}

// Avoid repeat deletion
if pod.DeletionTimestamp != nil {
return nil
}

podStartTime := pod.Status.StartTime.Time
for _, vol := range volumeList {
if vol.Status.RemountRequestedAt == "" {
Expand Down

0 comments on commit 4fa1cc1

Please sign in to comment.