Add prompt to upgrade node or delay before upgrade (#7168)

* Add prompt to upgrade node or delay before upgrade

* add docs
pull/7179/head
Sergey 2021-01-18 10:53:43 +03:00 committed by GitHub
parent b2995e4ec4
commit e3caff833c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 23 additions and 0 deletions

View File

@ -56,6 +56,11 @@ Client Version: version.Info{Major:"1", Minor:"6", GitVersion:"v1.6.0", GitCommi
Server Version: version.Info{Major:"1", Minor:"6", GitVersion:"v1.6.0+coreos.0", GitCommit:"8031716957d697332f9234ddf85febb07ac6c3e3", GitTreeState:"clean", BuildDate:"2017-03-29T04:33:09Z", GoVersion:"go1.7.5", Compiler:"gc", Platform:"linux/amd64"} Server Version: version.Info{Major:"1", Minor:"6", GitVersion:"v1.6.0+coreos.0", GitCommit:"8031716957d697332f9234ddf85febb07ac6c3e3", GitTreeState:"clean", BuildDate:"2017-03-29T04:33:09Z", GoVersion:"go1.7.5", Compiler:"gc", Platform:"linux/amd64"}
``` ```
If you want to manually control the upgrade procedure, you can use the variables `upgrade_node_confirm` or `upgrade_node_pause_seconds`:
`upgrade_node_confirm: true` - waiting to confirmation to upgrade next node
`upgrade_node_pause_seconds: 60` - pause 60 seconds before upgrade next node
## Multiple upgrades ## Multiple upgrades
:warning: [Do not skip releases when upgrading--upgrade by one tag at a time.](https://github.com/kubernetes-sigs/kubespray/issues/3849#issuecomment-451386515) :warning: :warning: [Do not skip releases when upgrading--upgrade by one tag at a time.](https://github.com/kubernetes-sigs/kubespray/issues/3849#issuecomment-451386515) :warning:

View File

@ -3,3 +3,6 @@ drain_grace_period: 300
drain_timeout: 360s drain_timeout: 360s
drain_pod_selector: "" drain_pod_selector: ""
drain_nodes: true drain_nodes: true
upgrade_node_confirm: false
upgrade_node_pause_seconds: 0

View File

@ -1,4 +1,19 @@
--- ---
# Wait for upgrade
- name: Confirm node upgrade
pause:
echo: yes
prompt: "Ready to upgrade node ?"
when:
- upgrade_node_confirm
- name: Wait before upgrade node
pause:
seconds: "{{ upgrade_node_pause_seconds }}"
when:
- not upgrade_node_confirm
- upgrade_node_pause_seconds != 0
# Node Ready: type = ready, status = True # Node Ready: type = ready, status = True
# Node NotReady: type = ready, status = Unknown # Node NotReady: type = ready, status = Unknown
- name: See if node is in ready state - name: See if node is in ready state