@leverege/build-tools 2.50.12 → 2.50.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/circleate.sh +0 -1
- package/src/dockreate.sh +2 -2
- package/src/k8scale.sh +10 -2
package/package.json
CHANGED
package/src/circleate.sh
CHANGED
package/src/dockreate.sh
CHANGED
|
@@ -98,7 +98,7 @@ DOCKERPLUGIN
|
|
|
98
98
|
# $3 = additional packages to install (htop redis-cli etc)
|
|
99
99
|
create_Dockerfile() {
|
|
100
100
|
local regvers="${1}"
|
|
101
|
-
local nodeimg="${2:-
|
|
101
|
+
local nodeimg="${2:-iron-alpine}"
|
|
102
102
|
local apkadds="${3}"
|
|
103
103
|
|
|
104
104
|
create_DockerfilePlugin
|
|
@@ -236,7 +236,7 @@ fi
|
|
|
236
236
|
|
|
237
237
|
# TODO: these should be combined into one require
|
|
238
238
|
nodeimg=$(packageJson '.leverege.nodeimg')
|
|
239
|
-
nodeimg="${nodeimg:-
|
|
239
|
+
nodeimg="${nodeimg:-iron-alpine}"
|
|
240
240
|
apkadds=$(packageJson '.leverege.apkadds')
|
|
241
241
|
runuser=$(packageJson '.leverege.runuser')
|
|
242
242
|
[ -z "${runuser}" ] && runuser='node'
|
package/src/k8scale.sh
CHANGED
|
@@ -19,8 +19,11 @@ case $DIRECTION in
|
|
|
19
19
|
REPLICAS=0
|
|
20
20
|
DIRECTION=down
|
|
21
21
|
;;
|
|
22
|
+
roll)
|
|
23
|
+
DIRECTION=roll
|
|
24
|
+
;;
|
|
22
25
|
*)
|
|
23
|
-
printf "Usage: `color g 'k8scale <up|dn|down> [deployment-list]'`\n\n" && exit 1
|
|
26
|
+
printf "Usage: `color g 'k8scale <up|dn|down|roll> [deployment-list]'`\n\n" && exit 1
|
|
24
27
|
esac
|
|
25
28
|
|
|
26
29
|
printf " scaled => `color g $DIRECTION`\n\n"
|
|
@@ -28,7 +31,12 @@ for DEPLOYMENT in "$@";
|
|
|
28
31
|
do
|
|
29
32
|
IFS="/" read SERVICE <<< "$DEPLOYMENT" # strip trailing /
|
|
30
33
|
RESULTS="`color g SUCCESS`"
|
|
31
|
-
|
|
34
|
+
if [ "$DIRECTION" == "roll" ];
|
|
35
|
+
then
|
|
36
|
+
kubectl rollout restart deployment $SERVICE &> $DEVNULL
|
|
37
|
+
else
|
|
38
|
+
kubectl scale --replicas=$REPLICAS deployment $SERVICE &> $DEVNULL
|
|
39
|
+
fi
|
|
32
40
|
[ $? -eq 1 ] && RESULTS="`color r FAILURE`"
|
|
33
41
|
printf " $RESULTS => $SERVICE\n"
|
|
34
42
|
sendToSlack "k8scale $DIRECTION $SERVICE"
|