From 40a19ed0e58546bde85bb58b550ed44c8ef8f001 Mon Sep 17 00:00:00 2001 From: Tchoupinax Date: Tue, 7 May 2024 17:55:37 +0200 Subject: [PATCH] fix bug when deployment are killed too earlier --- pod-status.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pod-status.go b/pod-status.go index 7af6832..44949c8 100644 --- a/pod-status.go +++ b/pod-status.go @@ -17,6 +17,6 @@ func waitUntilAllPodAreReady( logError(err.Error()) return false } - currentDeploymentHasAllPodReady := deployment.Status.Replicas - deployment.Status.ReadyReplicas == 0 + currentDeploymentHasAllPodReady := deployment.Status.Replicas-deployment.Status.ReadyReplicas == 0 && deployment.Status.Replicas > 1 return currentDeploymentHasAllPodReady }