Merge pull request #11568 from VannTen/cleanup/dont_rely_on_kube_node_existing

Only require minimum structure in inventory, part II
This commit is contained in:
Kubernetes Prow Robot
2024-09-27 11:30:02 +01:00
committed by GitHub
6 changed files with 14 additions and 23 deletions

View File

@@ -16,7 +16,7 @@ nodeRegistration:
{% if kube_override_hostname | default('') %}
name: "{{ kube_override_hostname }}"
{% endif %}
{% if inventory_hostname in groups['kube_control_plane'] and inventory_hostname not in groups['kube_node'] %}
{% if 'kube_control_plane' in group_names and 'kube_node' not in group_names %}
taints:
- effect: NoSchedule
key: node-role.kubernetes.io/control-plane

View File

@@ -24,7 +24,7 @@ controlPlane:
nodeRegistration:
name: {{ kube_override_hostname | default(inventory_hostname) }}
criSocket: {{ cri_socket }}
{% if inventory_hostname in groups['kube_control_plane'] and inventory_hostname not in groups['kube_node'] %}
{% if 'kube_control_plane' in group_names and 'kube_node' not in group_names %}
taints:
- effect: NoSchedule
key: node-role.kubernetes.io/control-plane