JIRA: BOTTLENECK-251
It seems the displaying of kubectl get pods changes and the
number of available pods is at the 4th cols.
Change-Id: I4b00bd084133a47907a0c7c9c655852b1ea52324
Signed-off-by: Yang (Gabriel) Yu <Gabriel.yuyang@huawei.com>
def get_available_pods(name, namespace):
CMD = ("kubectl get deployment --namespace={} | grep {}".format(
def get_available_pods(name, namespace):
CMD = ("kubectl get deployment --namespace={} | grep {}".format(
- namespace, name) + " | awk '{print $5}'")
+ namespace, name) + " | awk '{print $4}'")
available_pods = commands.getstatusoutput(CMD)
return int(available_pods[1])
available_pods = commands.getstatusoutput(CMD)
return int(available_pods[1])