mirror of
https://gitlab.com/psuapp/psu.git
synced 2024-08-30 18:12:34 +00:00
Add filter to skip services with replicas set to 0
This commit is contained in:
parent
8082eb7823
commit
11c1b98d60
6
psu
6
psu
@ -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() {
|
||||
|
Loading…
Reference in New Issue
Block a user