mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-21 02:41:25 +00:00
commit
4e07078fd5
@ -78,9 +78,12 @@ gcloud compute instances create ${MASTER_NAME}\
|
|||||||
--machine-type ${MASTER_SIZE} \
|
--machine-type ${MASTER_SIZE} \
|
||||||
--image ${IMAGE} \
|
--image ${IMAGE} \
|
||||||
--tags ${MASTER_TAG} \
|
--tags ${MASTER_TAG} \
|
||||||
--scopes compute-rw storage-full \
|
--no-scopes \
|
||||||
|
--restart-on-failure \
|
||||||
--metadata-from-file startup-script=${KUBE_TEMP}/master-start.sh &
|
--metadata-from-file startup-script=${KUBE_TEMP}/master-start.sh &
|
||||||
|
|
||||||
|
GCLOUD_VERSION=$(gcloud version | grep compute | cut -f 2 -d ' ')
|
||||||
|
|
||||||
for (( i=0; i<${#MINION_NAMES[@]}; i++)); do
|
for (( i=0; i<${#MINION_NAMES[@]}; i++)); do
|
||||||
(
|
(
|
||||||
echo "#! /bin/bash"
|
echo "#! /bin/bash"
|
||||||
@ -95,13 +98,25 @@ for (( i=0; i<${#MINION_NAMES[@]}; i++)); do
|
|||||||
--machine-type ${MINION_SIZE} \
|
--machine-type ${MINION_SIZE} \
|
||||||
--image ${IMAGE} \
|
--image ${IMAGE} \
|
||||||
--tags ${MINION_TAG} \
|
--tags ${MINION_TAG} \
|
||||||
|
--no-scopes \
|
||||||
|
--restart-on-failure \
|
||||||
--can-ip-forward \
|
--can-ip-forward \
|
||||||
--metadata-from-file startup-script=${KUBE_TEMP}/minion-start-${i}.sh &
|
--metadata-from-file startup-script=${KUBE_TEMP}/minion-start-${i}.sh &
|
||||||
|
|
||||||
|
# 'gcloud compute' past 2014.06.08 breaks the way we are specifying
|
||||||
|
# --next-hop-instance and there is no way to be compatible with both versions.
|
||||||
|
if [[ $GCLOUD_VERSION < "2014.06.08" ]]; then
|
||||||
gcloud compute routes create ${MINION_NAMES[$i]} \
|
gcloud compute routes create ${MINION_NAMES[$i]} \
|
||||||
--project ${PROJECT} \
|
--project ${PROJECT} \
|
||||||
--destination-range ${MINION_IP_RANGES[$i]} \
|
--destination-range ${MINION_IP_RANGES[$i]} \
|
||||||
--next-hop-instance ${ZONE}/instances/${MINION_NAMES[$i]} &
|
--next-hop-instance ${ZONE}/instances/${MINION_NAMES[$i]} &
|
||||||
|
else
|
||||||
|
gcloud compute routes create ${MINION_NAMES[$i]} \
|
||||||
|
--project ${PROJECT} \
|
||||||
|
--destination-range ${MINION_IP_RANGES[$i]} \
|
||||||
|
--next-hop-instance ${MINION_NAMES[$i]} \
|
||||||
|
--next-hop-instance-zone ${ZONE} &
|
||||||
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
FAIL=0
|
FAIL=0
|
||||||
|
Loading…
Reference in New Issue
Block a user