1
0
Fork 0
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:
Olev Kartau 2018-07-26 15:20:57 +03:00 committed by Markus Lehtonen
parent 175305b1ad
commit aa36619baa

View file

@ -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