kube-forge v2: embede python with ansible (kubespray) and cobra as cli building tool

This commit is contained in:
2025-06-22 00:37:47 +03:00
parent c2df2abc78
commit 4142a9db61
830 changed files with 874 additions and 2047 deletions

View File

@@ -0,0 +1,3 @@
---
delete_node_retries: 10
delete_node_delay_seconds: 3

View File

@@ -0,0 +1,13 @@
---
- name: Remove-node | Delete node
command: "{{ kubectl }} delete node {{ kube_override_hostname | default(inventory_hostname) }}"
delegate_to: "{{ groups['kube_control_plane'] | first }}"
when:
- groups['kube_control_plane'] | length > 0
# ignore servers that are not nodes
- ('k8s_cluster' in group_names) and kube_override_hostname | default(inventory_hostname) in nodes.stdout_lines
retries: "{{ delete_node_retries }}"
# Sometimes the api-server can have a short window of indisponibility when we delete a control plane node
delay: "{{ delete_node_delay_seconds }}"
register: result
until: result is not failed