kubeadm: warn only when config value is different with default value

Compare with two pointers will always show that they are different value,
so it will always print the warning message.

Signed-off-by: Dave Chen <dave.chen@arm.com>
This commit is contained in:
Dave Chen 2022-01-26 17:45:57 +08:00 committed by Dave Chen
parent dc96c3dfcc
commit 29a870da2e

View File

@ -223,7 +223,7 @@ func (kc *kubeletConfig) Default(cfg *kubeadmapi.ClusterConfiguration, _ *kubead
if kc.config.ResolverConfig == nil {
kc.config.ResolverConfig = utilpointer.String(kubeletSystemdResolverConfig)
} else {
if kc.config.ResolverConfig != utilpointer.String(kubeletSystemdResolverConfig) {
if *kc.config.ResolverConfig != kubeletSystemdResolverConfig {
warnDefaultComponentConfigValue(kind, "resolvConf", kubeletSystemdResolverConfig, *kc.config.ResolverConfig)
}
}