Skip to content

Commit 851b91a

Browse files
committed
fix: don't enable hostDNS for versions of Talos which do not have it
The problem is that `talosctl cluster create` tries to enable forwardKubeDNSToHost (for 1.7+), but due to the wrong condition this tries to enable `hostDNS` for any version of Talos, while it's only supported since 1.7+. Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
1 parent 42ac5cd commit 851b91a

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

pkg/machinery/config/generate/init.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ func (in *Input) init() ([]config.Document, error) {
9393
machine.MachineKubelet.KubeletDisableManifestsDirectory = pointer.To(true)
9494
}
9595

96-
if in.Options.VersionContract.HostDNSEnabled() || in.Options.HostDNSForwardKubeDNSToHost.ValueOrZero() {
96+
if in.Options.VersionContract.HostDNSEnabled() {
9797
machine.MachineFeatures.HostDNSSupport = &v1alpha1.HostDNSConfig{
9898
HostDNSEnabled: pointer.To(true),
9999
HostDNSForwardKubeDNSToHost: in.Options.HostDNSForwardKubeDNSToHost.Ptr(),

pkg/machinery/config/generate/worker.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ func (in *Input) worker() ([]config.Document, error) {
9494
machine.MachineKubelet.KubeletDisableManifestsDirectory = pointer.To(true)
9595
}
9696

97-
if in.Options.VersionContract.HostDNSEnabled() || in.Options.HostDNSForwardKubeDNSToHost.ValueOrZero() {
97+
if in.Options.VersionContract.HostDNSEnabled() {
9898
machine.MachineFeatures.HostDNSSupport = &v1alpha1.HostDNSConfig{
9999
HostDNSEnabled: pointer.To(true),
100100
HostDNSForwardKubeDNSToHost: in.Options.HostDNSForwardKubeDNSToHost.Ptr(),

0 commit comments

Comments
 (0)