Add filter to skip services with replicas set to 0

This commit is contained in:
Tortue Torche 2019-08-10 23:37:48 -04:00 committed by Tortue Torche
parent 8082eb7823
commit 11c1b98d60

6
psu
View File

@ -1066,7 +1066,11 @@ services() {
filters=="{$filter_service}" \
"Authorization: Bearer $AUTH_TOKEN")
check_for_errors $? "$services"
echo "$services"
local filter_mode
# If a service has a replicas set to zero, skip it!
filter_mode="map(select(.Spec.Mode.Global or any(.Spec.Mode.Replicated; .Replicas > 0)))"
echo "$services" | jq -jc "$filter_mode"
}
containers() {