From f4b1257310b1d4a26a993c94df9040dc617c8f1c Mon Sep 17 00:00:00 2001 From: "P. Douglas Reeder" Date: Tue, 10 Dec 2024 05:58:05 -0500 Subject: [PATCH] Apply script: fixes bug when deployment.status values are undefined --- community-edition/apply/index.js | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/community-edition/apply/index.js b/community-edition/apply/index.js index bcfdde5..cdb4824 100644 --- a/community-edition/apply/index.js +++ b/community-edition/apply/index.js @@ -15,11 +15,7 @@ function checkDeployments() { const output = JSON.parse(stdout); notReady.length = 0; for (const deployment of output.items) { - if ( - deployment.status.readyReplicas < deployment.status.replicas || - deployment.status.updatedReplicas < deployment.status.replicas || - deployment.status.availableReplicas < deployment.status.replicas - ) { + if ((deployment.status.readyReplicas ?? 0) < deployment.status.replicas) { notReady.push(deployment.metadata.name); } }