File tree Expand file tree Collapse file tree 3 files changed +7
-0
lines changed
Expand file tree Collapse file tree 3 files changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -26,6 +26,7 @@ MASTER_DISK_SIZE=${MASTER_DISK_SIZE:-20GB}
2626MINION_DISK_TYPE=pd-standard
2727MINION_DISK_SIZE=${MINION_DISK_SIZE:- 100GB}
2828REGISTER_MASTER_KUBELET=${REGISTER_MASTER:- true}
29+ PREEMPTIBLE_MINION=${PREEMPTIBLE_MINION:- false}
2930
3031OS_DISTRIBUTION=${KUBE_OS_DISTRIBUTION:- debian}
3132MASTER_IMAGE=${KUBE_GCE_MASTER_IMAGE:- container-vm-v20150806}
Original file line number Diff line number Diff line change @@ -27,6 +27,7 @@ MINION_DISK_TYPE=pd-standard
2727MINION_DISK_SIZE=${MINION_DISK_SIZE:- 100GB}
2828REGISTER_MASTER_KUBELET=${REGISTER_MASTER:- false}
2929KUBE_APISERVER_REQUEST_TIMEOUT=300
30+ PREEMPTIBLE_MINION=${PREEMPTIBLE_MINION:- false}
3031
3132OS_DISTRIBUTION=${KUBE_OS_DISTRIBUTION:- debian}
3233MASTER_IMAGE=${KUBE_GCE_MASTER_IMAGE:- container-vm-v20150806}
Original file line number Diff line number Diff line change @@ -398,6 +398,10 @@ function create-node-template {
398398 fi
399399
400400 local attempt=1
401+ local preemptible_minions=" "
402+ if [[ " ${PREEMPTIBLE_MINION} " == " true" ]]; then
403+ preemptible_minions=" --preemptible --maintenance-policy TERMINATE"
404+ fi
401405 while true ; do
402406 echo " Attempt ${attempt} to create ${1} " >&2
403407 if ! gcloud compute instance-templates create " $1 " \
@@ -409,6 +413,7 @@ function create-node-template {
409413 --image " ${MINION_IMAGE} " \
410414 --tags " ${MINION_TAG} " \
411415 --network " ${NETWORK} " \
416+ ${preemptible_minions} \
412417 $2 \
413418 --can-ip-forward \
414419 --metadata-from-file " $3 " ," $4 " >&2 ; then
You can’t perform that action at this time.
0 commit comments