From cd93d1068872a5492eba4c44f80ac96d04bcc96b Mon Sep 17 00:00:00 2001 From: Chinthiti Wisetsombat Date: Thu, 9 Jun 2022 00:08:22 +0700 Subject: [PATCH] Fix: set fallback value of kubelet ip6 (#8858) (#8926) (#8942) * Fix: set fallback value of kubelet ip6 (#8858) * Prune the spurious comma in the end of kubelet_address - Update `roles/kubernetes/node/defaults/main.yml` Co-authored-by: Cristian Calin <6627509+cristicalin@users.noreply.github.com> * Fix: set fallback value of kubelet ip6 (#8858) - Apply the lint: https://github.com/kubernetes-sigs/kubespray/pull/8926/commits/132606368e31bdb992fe45df80bd74d524b8ed89 Co-authored-by: Cristian Calin <6627509+cristicalin@users.noreply.github.com> Co-authored-by: Ho Kim Co-authored-by: Cristian Calin <6627509+cristicalin@users.noreply.github.com> --- 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 800c43f41..a47f10e85 100644 --- a/roles/kubernetes/node/defaults/main.yml +++ b/roles/kubernetes/node/defaults/main.yml @@ -3,7 +3,7 @@ kube_apiserver_insecure_bind_address: 127.0.0.1 # advertised host IP for kubelet. This affects network plugin config. Take caution -kubelet_address: "{{ ip | default(fallback_ips[inventory_hostname]) }}{{ ',' + ip6 if enable_dual_stack_networks and ip6 is defined }}" +kubelet_address: "{{ ip | default(fallback_ips[inventory_hostname]) }}{{ (',' + ip6) if enable_dual_stack_networks and ip6 is defined else '' }}" # bind address for kubelet. Set to 0.0.0.0 to listen on all interfaces kubelet_bind_address: "{{ ip | default('0.0.0.0') }}"