diff --git a/pkg/machinery/config/generate/init.go b/pkg/machinery/config/generate/init.go index dcb6cd4b1a..355703b3eb 100644 --- a/pkg/machinery/config/generate/init.go +++ b/pkg/machinery/config/generate/init.go @@ -95,7 +95,7 @@ func (in *Input) init() ([]config.Document, error) { machine.MachineKubelet.KubeletDisableManifestsDirectory = pointer.To(true) } - if in.Options.VersionContract.HostDNSEnabled() || in.Options.HostDNSForwardKubeDNSToHost.ValueOrZero() { + if in.Options.VersionContract.HostDNSEnabled() { machine.MachineFeatures.HostDNSSupport = &v1alpha1.HostDNSConfig{ HostDNSEnabled: pointer.To(true), HostDNSForwardKubeDNSToHost: in.Options.HostDNSForwardKubeDNSToHost.Ptr(), diff --git a/pkg/machinery/config/generate/worker.go b/pkg/machinery/config/generate/worker.go index 51487fd1e7..f7650be72b 100644 --- a/pkg/machinery/config/generate/worker.go +++ b/pkg/machinery/config/generate/worker.go @@ -96,7 +96,7 @@ func (in *Input) worker() ([]config.Document, error) { machine.MachineKubelet.KubeletDisableManifestsDirectory = pointer.To(true) } - if in.Options.VersionContract.HostDNSEnabled() || in.Options.HostDNSForwardKubeDNSToHost.ValueOrZero() { + if in.Options.VersionContract.HostDNSEnabled() { machine.MachineFeatures.HostDNSSupport = &v1alpha1.HostDNSConfig{ HostDNSEnabled: pointer.To(true), HostDNSForwardKubeDNSToHost: in.Options.HostDNSForwardKubeDNSToHost.Ptr(),