kubeadm: fix inverted warning message

Before this commit when setting bindAddress to 1.2.3.4 the warning was:
The recommended value for "bindAddress" in "KubeProxyConfiguration" is: 1.2.3.4; the provided value is: 0.0.0.0

Signed-off-by: Etienne Champetier <e.champetier@ateme.com>
This commit is contained in:
Etienne Champetier 2021-11-09 20:54:57 -05:00
parent c04157895c
commit 356d9e0626

View File

@ -103,7 +103,7 @@ func (kp *kubeProxyConfig) Default(cfg *kubeadmapi.ClusterConfiguration, localAP
if kp.config.BindAddress == "" {
kp.config.BindAddress = defaultBindAddress
} else if kp.config.BindAddress != defaultBindAddress {
warnDefaultComponentConfigValue(kind, "bindAddress", kp.config.BindAddress, defaultBindAddress)
warnDefaultComponentConfigValue(kind, "bindAddress", defaultBindAddress, kp.config.BindAddress)
}
if kp.config.ClusterCIDR == "" && cfg.Networking.PodSubnet != "" {