mirror of
https://github.com/edgelesssys/constellation.git
synced 2024-10-01 01:36:09 -04:00
ci: fix recover wait condition (#2257)
This commit is contained in:
parent
5cf2a59c2c
commit
38dcb3dbab
8
.github/actions/e2e_recover/action.yml
vendored
8
.github/actions/e2e_recover/action.yml
vendored
@ -18,8 +18,14 @@ runs:
|
||||
KUBECONFIG: ${{ inputs.kubeconfig }}
|
||||
run: |
|
||||
WORKER_NODE=$(kubectl get nodes --selector='!node-role.kubernetes.io/control-plane' -o json | jq '.items[0].metadata.name' -r)
|
||||
|
||||
echo "Disabling the join-service and waiting for the node to be unresponsive"
|
||||
kubectl patch daemonset -n kube-system join-service -p '{"spec":{"template":{"spec":{"nodeSelector":{"some-tag":""}}}}}'
|
||||
kubectl debug node/$WORKER_NODE --image=ubuntu -- bash -c "echo reboot > reboot.sh && chroot /host < reboot.sh"
|
||||
kubectl wait --for=condition=Ready=false --timeout=10m node/$WORKER_NODE
|
||||
kubectl wait --for=condition=Ready=Unknown --timeout=10m node/$WORKER_NODE
|
||||
|
||||
echo "Re-enabling the join-service and waiting for the node to be back up"
|
||||
kubectl patch daemonset -n kube-system join-service --type=json -p='[{"op": "remove", "path": "/spec/template/spec/nodeSelector/some-tag"}]'
|
||||
kubectl wait --for=condition=Ready=true --timeout=10m --all nodes
|
||||
|
||||
- name: Restart all control plane nodes
|
||||
|
Loading…
Reference in New Issue
Block a user