diff --git a/CHANGELOG.md b/CHANGELOG.md index 17921d3fc..93e18780f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ - (Feature) Deprecate Actions - (Bugfix) Debug mode - (Improvement) Switch to Lease API +- (Bugfix) Fix Member Terminating state discovery ## [1.2.32](https://github.com/arangodb/kube-arangodb/tree/1.2.32) (2023-08-07) - (Feature) Backup lifetime - remove Backup once its lifetime has been reached diff --git a/pkg/util/k8sutil/pods.go b/pkg/util/k8sutil/pods.go index 94170f5a7..4721fd5b2 100644 --- a/pkg/util/k8sutil/pods.go +++ b/pkg/util/k8sutil/pods.go @@ -295,10 +295,9 @@ func IsPodMarkedForDeletion(pod *core.Pod) bool { return pod.DeletionTimestamp != nil } -// IsPodTerminating returns true if the pod has been marked for deletion -// but is still running. +// IsPodTerminating returns true if the pod has been marked for deletion. func IsPodTerminating(pod *core.Pod) bool { - return IsPodMarkedForDeletion(pod) && pod.Status.Phase == core.PodRunning + return IsPodMarkedForDeletion(pod) } // getPodCondition returns the condition of given type in the given status.