Decrease provisioner pause;Apply bug workaround;Housekeeping
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Danny Bessems 2023-02-06 10:59:41 +01:00
parent 1c950086fa
commit abcf530b49
3 changed files with 21 additions and 11 deletions

View File

@ -5,15 +5,26 @@
kubeconfig: "{{ kubeconfig.path }}"
- name: Drain node
kubernetes.core.k8s_drain:
name: "{{ decom_nodename }}"
state: drain
delete_options:
ignore_daemonsets: true
delete_emptydir_data: true
wait_sleep: 10
wait_timeout: 0
kubeconfig: "{{ kubeconfig.path }}"
# Currently does not work; returns with error "Failed to delete pod [...] due to: Too Many Requests"
# See also: https://github.com/ansible-collections/kubernetes.core/issues/474
# kubernetes.core.k8s_drain:
# name: "{{ decom_nodename }}"
# state: drain
# delete_options:
# ignore_daemonsets: true
# delete_emptydir_data: true
# kubeconfig: "{{ kubeconfig.path }}"
ansible.builtin.shell:
cmd: >-
kubectl drain {{ decom_nodename }} \
--delete-emptydir-data \
--ignore-daemonsets
register: nodedrain_results
until:
- nodedrain_results is not failed
- (nodedrain_results.stdout_lines | last) is match('node/.* drained')
retries: "{{ playbook.retries }}"
delay: "{{ playbook.delay.short }}"
- name: Delete node
kubernetes.core.k8s:

View File

@ -10,7 +10,6 @@
name: "{{ virtualmachine_details.instance.hw_name }}"
folder: "{{ virtualmachine_details.instance.hw_folder }}"
state: poweredoff
# state_change_timeout: "{{ playbook.delay.long }}"
# - name: Delete VM
# community.vmware.vmware_guest:

View File

@ -25,7 +25,7 @@ build {
}
provisioner "ansible" {
pause_before = "2m30s"
pause_before = "45s"
playbook_file = "ansible/playbook.yml"
user = "ubuntu"