Ignore unset replica counts for scaled-down deployments
This commit is contained in:
parent
f912456297
commit
78116413e6
|
|
@ -1590,7 +1590,7 @@ status_recent_deployments() {
|
|||
kubectl --kubeconfig "${KUBECONFIG_PATH}" get deployments -A \
|
||||
-o custom-columns='NAMESPACE:.metadata.namespace,NAME:.metadata.name,READY:.status.readyReplicas,DESIRED:.spec.replicas,UPDATED:.status.updatedReplicas,AVAILABLE:.status.availableReplicas,AGE:.metadata.creationTimestamp' \
|
||||
--no-headers 2>/dev/null |
|
||||
awk '$3 != $4 || $5 != $4 || $6 != $4 { print }'
|
||||
awk '{ ready = ($3 == "<none>" ? 0 : $3); updated = ($5 == "<none>" ? 0 : $5); available = ($6 == "<none>" ? 0 : $6); if (ready != $4 || updated != $4 || available != $4) print }'
|
||||
)"
|
||||
if [[ -n "${rows}" ]]; then
|
||||
printf '%s\n' "${rows}" >&2
|
||||
|
|
|
|||
Loading…
Reference in New Issue