From 0f56fadb28b3e052d199e05cc6dfd64a9196c272 Mon Sep 17 00:00:00 2001 From: Nikita Vaniasin Date: Fri, 15 Sep 2023 09:51:35 +0200 Subject: [PATCH] Add check for ConditionTypeTerminating --- CHANGELOG.md | 3 +-- .../reconcile/plan_builder_member_pod_scheduling_failure.go | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 74d8bef6f..010960310 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -29,8 +29,7 @@ - (Maintenance) Bump K8S Version to 1.24.16 - (Maintenance) Bump K8S Version to 1.25.12 - (Maintenance) Bump Go to 1.20.7 -- (Improvement) Restart pod if it could not be scheduled and related scheduling parameters changed -- (Improvement) Remove PodSchedulingFailure condition instead of setting to false +- (Improvement) Remove PodSchedulingFailure condition instead of setting to false, restart pod if it could not be scheduled ## [1.2.31](https://github.com/arangodb/kube-arangodb/tree/1.2.31) (2023-07-14) - (Improvement) Block traffic on the services if there is more than 1 active leader in ActiveFailover mode diff --git a/pkg/deployment/reconcile/plan_builder_member_pod_scheduling_failure.go b/pkg/deployment/reconcile/plan_builder_member_pod_scheduling_failure.go index 77575e557..a3334efe3 100644 --- a/pkg/deployment/reconcile/plan_builder_member_pod_scheduling_failure.go +++ b/pkg/deployment/reconcile/plan_builder_member_pod_scheduling_failure.go @@ -50,7 +50,7 @@ func (r *Reconciler) createMemberPodSchedulingFailurePlan(ctx context.Context, continue } - if m.Member.Conditions.IsTrue(api.ConditionTypeScheduled) { + if m.Member.Conditions.IsTrue(api.ConditionTypeScheduled) || m.Member.Conditions.IsTrue(api.ConditionTypeTerminating) { // Action is needed only for pods which are not scheduled yet continue }