-
Notifications
You must be signed in to change notification settings - Fork 21
Open
Labels
documentationImprovements or additions to documentationImprovements or additions to documentation
Description
We have e.g. https://github.com/flatcar-linux/flatcar-linux-update-operator/blob/53f08043e320c853940ed7b4c126c7b72af1af00/examples/reboot-annotations/after-reboot-daemonset.yaml right now, but it only annotates the node right away, which is not very useful, as it does not allow implementing any logic.
We should change those to:
- Use an agent Service Account so hook has appropriate permissions to update the Node object.
- Use shell + kubectl to be able to write some simple logic for annotating nodes. Something like this should be possible:
while true; do kubectl annotate node $NODENAME --overwrite=true has-attached-volumes=$(if [ $(kubectl get volumeattachment | grep $NODENAME | wc -l) -gt 0 ]; then echo true; else echo false; fi); sleep 30; done(to workaround Ensure update-agent waits for all volumes to be detached before rebooting #30).
mikekuzak
Metadata
Metadata
Assignees
Labels
documentationImprovements or additions to documentationImprovements or additions to documentation