@@ -49,6 +49,31 @@ echo "Installing Vela CLI"
4949$dau bash -c ' curl -fsSl https://kubevela.io/script/install.sh | bash'
5050echo " Configuration complete."
5151
52+ cat > /home/ubuntu/kubevela-values.yaml << EOF
53+ nodeSelector:
54+ "node-role.kubernetes.io/control-plane": ""
55+ tolerations:
56+ - key: "node-role.kubernetes.io/control-plane"
57+ operator: "Exists"
58+ effect: "NoSchedule"
59+ EOF
60+
61+ $dau bash -c ' helm repo add kubevela https://kubevela.github.io/chart && helm repo update'
62+
63+ cat > /home/ubuntu/patch-pin-to-control-plane.yaml << EOF
64+ apiVersion: apps/v1
65+ kind: Deployment
66+ spec:
67+ template:
68+ spec:
69+ nodeSelector:
70+ "node-role.kubernetes.io/control-plane": ""
71+ tolerations:
72+ - key: "node-role.kubernetes.io/control-plane"
73+ operator: "Exists"
74+ effect: "NoSchedule"
75+ EOF
76+
5277echo " Setting KubeVela..."
5378# Function to check for worker nodes and install KubeVela
5479cat > /home/ubuntu/install_kubevela.sh << 'EOF '
@@ -57,7 +82,7 @@ echo "Start install_kubevela.sh"
5782echo "-----${KUBECONFIG}---------"
5883sudo cat ${KUBECONFIG}
5984echo "--------------"
60- sudo -H -E -u ubuntu bash -c 'vela install -y -- version 1.9.11'
85+ sudo -H -E -u ubuntu bash -c 'helm upgrade -- install --create-namespace -n vela-system kubevela kubevela/vela-core -- version 1.9.11 --values /home/ubuntu/kubevela-values.yaml --wait '
6186echo "Vela installation done."
6287if [ "$SERVERLESS_ENABLED" == "yes" ]; then
6388 echo "Serverless installation."
@@ -75,6 +100,10 @@ if [ "$SERVERLESS_ENABLED" == "yes" ]; then
75100 # Apply Knative Serving CRDs and core components
76101 kubectl apply -f https://github.com/knative/serving/releases/download/knative-v1.12.4/serving-crds.yaml
77102 kubectl apply -f https://github.com/knative/serving/releases/download/knative-v1.12.4/serving-core.yaml
103+ kubectl patch deployment -n knative-serving activator --patch "$(cat /home/ubuntu/patch-pin-to-control-plane.yaml)"
104+ kubectl patch deployment -n knative-serving autoscaler --patch "$(cat /home/ubuntu/patch-pin-to-control-plane.yaml)"
105+ kubectl patch deployment -n knative-serving controller --patch "$(cat /home/ubuntu/patch-pin-to-control-plane.yaml)"
106+ kubectl patch deployment -n knative-serving webhook --patch "$(cat /home/ubuntu/patch-pin-to-control-plane.yaml)"
78107
79108 # Download and apply Kourier
80109 sudo wget https://raw.githubusercontent.com/eu-nebulous/sal-scripts/$NEBULOUS_SCRIPTS_BRANCH/serverless/kourier.yaml
0 commit comments