File tree Expand file tree Collapse file tree 2 files changed +11
-4
lines changed Expand file tree Collapse file tree 2 files changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -62,6 +62,7 @@ onInstall:
6262 - forEach(node:nodes.${@group}):
6363 upgrade-workers:
6464 id: ${@node.id}
65+ group: ${@group}
6566 hostname: node${@node.id}-${env.domain}
6667 version: ${settings.version}
6768 - env.control.ApplyNodeGroupData [${globals.workers}]:
@@ -436,6 +437,7 @@ actions:
436437 systemctl enable kubelet.service
437438 - cmd[${nodes.k8sm.master.id}]: |-
438439 /usr/bin/kubectl uncordon ${this.hostname} || exit 5
440+ /usr/local/sbin/worker-config -n ${this.id} -g ${this.group} -r ${env.region}
439441 while true; do echo "$(kubectl get pods --field-selector=status.phase=Pending -n kube-system)" | grep -q Pending || break; sleep 3; done
440442
441443success:
Original file line number Diff line number Diff line change @@ -31,7 +31,9 @@ onInstall:
3131 - init-main-master
3232 - init-slave-masters
3333 - connect-workers: cp
34- - apply-worker-integration: cp
34+ - apply-worker-config:
35+ nodes: ${nodes.cp.join(id,)}
36+ group: cp
3537 - setup-overlay
3638 - if ('${settings.ingress-controller}' == 'Nginx'):
3739 - setGlobals:
@@ -125,7 +127,9 @@ onAfterScaleOut:
125127 - prepare-worker-integration
126128 - cmd [${this.nodes}]: init-instance.sh --type=worker --initial=true --base-url=$(echo '${baseUrl}' | base64 -w 0)
127129 - connect-workers: ${this.nodes}
128- - apply-worker-integration: ${this.nodes}
130+ - apply-worker-config:
131+ nodes: ${this.nodes}
132+ group: ${event.response.nodes.nodeGroup}
129133 - if ('${this.ips}'):
130134 cmd[${nodes.k8sm.master.id}]: metallb-config -a '${this.ips}'
131135
@@ -219,8 +223,9 @@ actions:
219223 - setGlobals:
220224 worker_integration: ${response.out}
221225
222- apply-worker-integration:
223- - cmd[${this}]: |-
226+ apply-worker-config:
227+ - cmd[${nodes.k8sm.master.id}]: screen -d -m /usr/local/sbin/worker-config -n ${this.nodes} -g ${this.group} -r ${env.region}
228+ - cmd[${this.nodes}]: |-
224229 mkdir /var/lib/worker &>/dev/null || rm -rf /var/lib/worker/*
225230 echo '${globals.worker_integration}' | base64 -d | tar zxv --strip-components=4 -C /var/lib/worker
226231 screen -d -m /usr/bin/bash -c '/usr/local/sbin/worker-integration.sh &>/var/log/kubernetes/k8s-worker-integration.log'
You can’t perform that action at this time.
0 commit comments