From 9f45552201ea4eed09260787b65dc8853042d4ac Mon Sep 17 00:00:00 2001 From: Max Gautier Date: Mon, 23 Sep 2024 14:07:28 +0200 Subject: [PATCH] Cleanup redundancy k8s_cluster = kube_control_plane + kube_node --- roles/kubernetes/node/defaults/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/kubernetes/node/defaults/main.yml b/roles/kubernetes/node/defaults/main.yml index 1df9d6418..a0ab20854 100644 --- a/roles/kubernetes/node/defaults/main.yml +++ b/roles/kubernetes/node/defaults/main.yml @@ -28,7 +28,7 @@ kubelet_systemd_wants_dependencies: [] # List of secure IPs for kubelet kube_node_addresses: >- - {%- for host in (groups['kube_control_plane'] + groups['kube_node'] + groups['etcd']) | unique -%} + {%- for host in (groups['k8s_cluster'] | union(groups['etcd'])) -%} {{ hostvars[host]['ip'] | default(fallback_ips[host]) }}{{ ' ' if not loop.last else '' }} {%- endfor -%} kubelet_secure_addresses: "localhost link-local {{ kube_pods_subnet }} {{ kube_node_addresses }}"