mirror of
https://github.com/kubernetes-sigs/node-feature-discovery.git
synced 2024-12-14 11:57:51 +00:00
label-nodes.sh: match Ready without side-strings (#151)
Counting nodes in Ready state was too fragile, matching entries like: Ready,SchedulingDisabled NotReady By requiring whitespace on both side, we accept only clean Ready.
This commit is contained in:
parent
175305b1ad
commit
aa36619baa
1 changed files with 1 additions and 1 deletions
|
@ -1,6 +1,6 @@
|
|||
#!/usr/bin/env bash
|
||||
# Get the number of nodes in Ready state in the Kubernetes cluster
|
||||
NumNodes=$(kubectl get nodes | grep -i ready | wc -l)
|
||||
NumNodes=$(kubectl get nodes | grep -i ' ready ' | wc -l)
|
||||
|
||||
# We set the .spec.completions and .spec.parallelism to the node count
|
||||
# We request a specific hostPort in the job spec to limit the number of pods
|
||||
|
|
Loading…
Reference in a new issue