Skip to content
Snippets Groups Projects
Unverified Commit fbcc8cc3 authored by Max Gautier's avatar Max Gautier
Browse files

control-plane: refactor group membership test

Testing with group_names does not require the groups to exist.
parent 0679d9c8
Branches
Tags
No related merge requests found
...@@ -16,7 +16,7 @@ nodeRegistration: ...@@ -16,7 +16,7 @@ nodeRegistration:
{% if kube_override_hostname | default('') %} {% if kube_override_hostname | default('') %}
name: "{{ kube_override_hostname }}" name: "{{ kube_override_hostname }}"
{% endif %} {% 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: taints:
- effect: NoSchedule - effect: NoSchedule
key: node-role.kubernetes.io/control-plane key: node-role.kubernetes.io/control-plane
......
...@@ -24,7 +24,7 @@ controlPlane: ...@@ -24,7 +24,7 @@ controlPlane:
nodeRegistration: nodeRegistration:
name: {{ kube_override_hostname | default(inventory_hostname) }} name: {{ kube_override_hostname | default(inventory_hostname) }}
criSocket: {{ cri_socket }} 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: taints:
- effect: NoSchedule - effect: NoSchedule
key: node-role.kubernetes.io/control-plane key: node-role.kubernetes.io/control-plane
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment