Created
June 20, 2018 12:25
-
-
Save kanedafromparis/57a849e6fa4a27fdf1deecf2eb3c9c8d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
TIMESLOT=`date +%y%m%d%H%M%S`; | |
for proj in $(oc get project --show-labels -l zone!=production,role!=webhop --no-headers | cut -d " " -f 1); do | |
for dc in $(oc get dc -n $proj --show-labels -l zone!=production,role!=webhop --no-headers | cut -d " " -f 1); do | |
#echo " dc $dc --replicas=0 -n $proj " | tee -a $TIMESLOT-scaledown.log; | |
oc scale dc $dc --replicas=0 -n $proj | tee -a $TIMESLOT-scaledown.log; | |
done | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment