Skip to content
This repository was archived by the owner on Sep 6, 2022. It is now read-only.

Commit 7b4e48f

Browse files
committed
Rollback to k8s 1.20.8, disable autoupgrade and wait for load balancer
1 parent e367adb commit 7b4e48f

File tree

2 files changed

+25
-11
lines changed

2 files changed

+25
-11
lines changed

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,14 @@ build: ## Build docker image containing the required tools for the installation
99
@docker build --quiet . -t ${IMG}
1010

1111
DOCKER_RUN_CMD = docker run -it \
12-
--env GOOGLE_APPLICATION_CREDENTIALS=/gcloud/application_default_credentials.json \
1312
--volume $$HOME/.config/gcloud:/root/.config/gcloud \
13+
--volume $$HOME/.kube/config:/root/.kube/config \
1414
--volume $$PWD:/gitpod \
1515
${IMG} $(1)
1616

1717
install: ## Install Gitpod
1818
@echo "Starting install process..."
19-
@test -s $$HOME/.config/gcloud/application_default_credentials.json || { echo "GCP default dredentials do not exist. Run [gcloud auth application-default login] to configure them"; exit 1; }
19+
@test $(shell gcloud info --format="value(config.account)") || { echo "GCP dredentials do not exist. Run [gcloud auth login] to configure them"; exit 1; }
2020
$(call DOCKER_RUN_CMD, --install)
2121

2222
uninstall: ## Uninstall Gitpod

setup.sh

Lines changed: 23 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,7 @@ DNS_SA_EMAIL="${DNS_SA}"@"${PROJECT_NAME}".iam.gserviceaccount.com
3030
SERVICES_POOL="workload-services"
3131
WORKSPACES_POOL="workload-workspaces"
3232

33-
GKE_VERSION=${GKE_VERSION:="1.21.3-gke.100"}
34-
RELEASE_CHANNEL=${RELEASE_CHANNEL:="rapid"}
33+
GKE_VERSION=${GKE_VERSION:="1.20.8-gke.900"}
3534

3635
GITPOD_VERSION=${GITPOD_VERSION:="aledbf-mk3.55"}
3736

@@ -80,7 +79,7 @@ function create_node_pool() {
8079
--image-type="UBUNTU_CONTAINERD" \
8180
--machine-type="n2-standard-4" \
8281
--num-nodes=1 \
83-
--enable-autoupgrade --enable-autorepair --enable-autoscaling \
82+
--no-enable-autoupgrade --enable-autorepair --enable-autoscaling \
8483
--metadata disable-legacy-endpoints=true \
8584
--scopes="gke-default,https://www.googleapis.com/auth/ndev.clouddns.readwrite" \
8685
--node-labels="${NODES_LABEL}" \
@@ -240,6 +239,25 @@ function service_account_exits() {
240239
fi
241240
}
242241

242+
function wait_for_load_balancer() {
243+
sleep 10
244+
245+
COUNT=0
246+
LB_IP_ADDRESS=""
247+
while [ "${LB_IP_ADDRESS}" == "" ] && [ "${COUNT}" -lt 5 ];do
248+
printf "."
249+
LB_IP_ADDRESS=$(kubectl get service proxy -o=jsonpath='{.status.loadBalancer.ingress[0].ip}')
250+
((COUNT+=1))
251+
sleep 5
252+
done
253+
254+
if [ -n "${LB_IP_ADDRESS}" ];then
255+
printf '\nLoad balancer IP address: %s\n' "${LB_IP_ADDRESS}"
256+
else
257+
printf '\n The load balancer is still being provisioned. Wait a couple of minutes.'
258+
fi
259+
}
260+
243261
function install() {
244262
check_prerequisites
245263

@@ -311,8 +329,8 @@ function install() {
311329
--service-account "$GKE_SA_EMAIL" \
312330
--num-nodes=1 \
313331
--no-enable-basic-auth \
314-
--release-channel="${RELEASE_CHANNEL}" \
315332
--enable-autoscaling \
333+
--enable-autorepair --no-enable-autoupgrade \
316334
--enable-ip-alias --enable-network-policy \
317335
--create-subnetwork name="gitpod-${CLUSTER_NAME}" \
318336
--metadata=disable-legacy-endpoints=true \
@@ -359,11 +377,7 @@ function install() {
359377
install_jaeger_operator
360378
install_gitpod
361379

362-
LB_IP_ADDRESS=$(kubectl get service proxy -o json | jq -r .status.loadBalancer.ingress[0].ip)
363-
if [ -n "${LB_IP_ADDRESS}" ];then
364-
printf '\nLoad balancer IP address: %s\n' "${LB_IP_ADDRESS}"
365-
fi
366-
380+
wait_for_load_balancer
367381
}
368382

369383
function setup_kubectl() {

0 commit comments

Comments
 (0)