From 8af20ba79fecc80cfef70926718dfc08bfab0633 Mon Sep 17 00:00:00 2001 From: Ciprian Hacman Date: Fri, 19 Jan 2024 06:12:08 +0200 Subject: [PATCH] Use dns=none for newly created clusters including for AWS and GCE --- upup/pkg/fi/cloudup/new_cluster.go | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/upup/pkg/fi/cloudup/new_cluster.go b/upup/pkg/fi/cloudup/new_cluster.go index d54c41f07b..4953ff1057 100644 --- a/upup/pkg/fi/cloudup/new_cluster.go +++ b/upup/pkg/fi/cloudup/new_cluster.go @@ -1418,13 +1418,12 @@ func setupDNSTopology(opt *NewClusterOptions, cluster *api.Cluster) error { if opt.DNSZone != "" { // Use dns=public if zone is specified cluster.Spec.Networking.Topology.DNS = api.DNSTypePublic - } else if cluster.UsesLegacyGossip() { - // Use dns=none if .k8s.local is specified instead of Gossip - klog.Warningf("Gossip is deprecated, using None DNS instead") - cluster.Spec.Networking.Topology.DNS = api.DNSTypeNone - } else if cluster.Spec.GetCloudProvider() == api.CloudProviderAWS || cluster.Spec.GetCloudProvider() == api.CloudProviderGCE { - cluster.Spec.Networking.Topology.DNS = api.DNSTypePublic } else { + if cluster.UsesLegacyGossip() { + // Warn about using dns=none instead of Gossip + klog.Warningf("Gossip is deprecated, using None DNS instead") + } + // Default to dns=none instead of dns=public for all cloud providers cluster.Spec.Networking.Topology.DNS = api.DNSTypeNone } case "public":