Skip to content

Commit fc7ebee

Browse files
committed
Revert "Remove calico hacks"
This reverts commit f5b534f.
1 parent e77d374 commit fc7ebee

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

dev/preview/infrastructure/scripts/bootstrap-k3s.sh

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,6 @@ export INSTALL_K3S_SKIP_DOWNLOAD=true
2626
# failing occasionally. Sleeping for a bit solves it.
2727
sleep 10
2828

29-
# shellcheck disable=SC2154
30-
# shellcheck disable=SC2086
3129
kubectl label nodes ${vm_name} \
3230
gitpod.io/workload_meta=true \
3331
gitpod.io/workload_ide=true \
@@ -39,9 +37,15 @@ kubectl label nodes ${vm_name} \
3937
gitpod.io/workspace_1=true \
4038
gitpod.io/workspace_2=true
4139

42-
sed -i 's/docker.io/quay.io/g' /var/lib/gitpod/manifests/calico.yaml
40+
# apply fix from https://github.com/k3s-io/klipper-lb/issues/6 so we can use the klipper servicelb
41+
# this can be removed if https://github.com/gitpod-io/gitpod-packer-gcp-image/pull/20 gets merged
42+
cat /var/lib/gitpod/manifests/calico.yaml | sed s/__KUBERNETES_NODE_NAME__\"\,/__KUBERNETES_NODE_NAME__\",\ \"container_settings\"\:\ \{\ \"allow_ip_forwarding\"\:\ true\ \}\,/ >/var/lib/gitpod/manifests/calico2.yaml
4343

44-
kubectl apply -f /var/lib/gitpod/manifests/calico.yaml
44+
sed -i 's/docker.io/quay.io/g' /var/lib/gitpod/manifests/calico2.yaml
45+
sed -i 's/interface=ens/interface=en/g' /var/lib/gitpod/manifests/calico2.yaml
46+
sed -i 's/\$CLUSTER_IP_RANGE/10.20.0.0\/16/g' /var/lib/gitpod/manifests/calico2.yaml
47+
48+
kubectl apply -f /var/lib/gitpod/manifests/calico2.yaml
4549

4650
kubectl apply -f /var/lib/gitpod/manifests/cert-manager.yaml
4751
kubectl apply -f /var/lib/gitpod/manifests/metrics-server.yaml

0 commit comments

Comments
 (0)