Merge pull request #3283 from mattymo/more_upgrade_options

Extra options for upgrade mode
This commit is contained in:
k8s-ci-robot 2018-09-12 10:50:33 -07:00 committed by GitHub
commit a5cc8537f9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 6 deletions

View file

@ -1,3 +1,5 @@
---
drain_grace_period: 300
drain_timeout: 360s
drain_label_selector: ""
drain_nodes: true

View file

@ -35,10 +35,13 @@
- name: Drain node
command: >-
{{ bin_dir }}/kubectl drain
--force
--ignore-daemonsets
--grace-period {{ drain_grace_period }}
--timeout {{ drain_timeout }}
--delete-local-data {{ inventory_hostname }}
--force
--ignore-daemonsets
--grace-period {{ drain_grace_period }}
--timeout {{ drain_timeout }}
--delete-local-data {{ inventory_hostname }}
{% if drain_label_selector != "" %}--selector '{{ drain_label_selector }}'{% endif %}
delegate_to: "{{ groups['kube-master'][0] }}"
when: needs_cordoning
when:
- drain_nodes
- needs_cordoning