Merge pull request #16262 from hakman/dns-none-aws-and-gce

Use dns=none for newly created clusters including for AWS and GCE
This commit is contained in:
Kubernetes Prow Robot 2024-01-19 12:11:21 +01:00 committed by GitHub
commit 13d58b153b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
32 changed files with 104 additions and 92 deletions

View File

@ -5,7 +5,9 @@ metadata:
name: minimal.example.com
spec:
api:
dns: {}
loadBalancer:
class: Network
type: Public
authorization:
rbac: {}
channel: stable
@ -41,7 +43,6 @@ spec:
- 0.0.0.0/0
- ::/0
kubernetesVersion: v1.26.0
masterPublicName: api.minimal.example.com
networkCIDR: 172.20.0.0/16
networking:
cilium:
@ -58,7 +59,7 @@ spec:
zone: us-test-1a
topology:
dns:
type: Public
type: None
---

View File

@ -58,7 +58,6 @@ spec:
- 0.0.0.0/0
- ::/0
kubernetesVersion: v1.26.0
masterPublicName: api.complex.example.com
networkCIDR: 10.0.0.0/16
networking:
cni: {}
@ -126,7 +125,7 @@ spec:
bastion:
bastionPublicName: bastion.complex.example.com
dns:
type: Public
type: None
---

View File

@ -10,7 +10,9 @@ spec:
- 10.3.0.0/16
- 10.4.0.0/16
api:
dns: {}
loadBalancer:
class: Network
type: Public
authorization:
rbac: {}
channel: stable
@ -56,7 +58,6 @@ spec:
- 0.0.0.0/0
- ::/0
kubernetesVersion: v1.26.0
masterPublicName: api.complex.example.com
networkCIDR: 10.0.0.0/16
networking:
cni: {}
@ -94,7 +95,7 @@ spec:
zone: us-test-1a
topology:
dns:
type: Public
type: None
---

View File

@ -5,7 +5,8 @@ metadata:
name: gce.example.com
spec:
api:
dns: {}
loadBalancer:
type: Public
authorization:
rbac: {}
channel: stable
@ -39,7 +40,6 @@ spec:
- 0.0.0.0/0
- ::/0
kubernetesVersion: v1.21.0
masterPublicName: api.gce.example.com
networking:
cni: {}
nonMasqueradeCIDR: 100.64.0.0/10
@ -54,7 +54,7 @@ spec:
type: Public
topology:
dns:
type: Public
type: None
---

View File

@ -5,7 +5,9 @@ metadata:
name: ha.example.com
spec:
api:
dns: {}
loadBalancer:
class: Network
type: Public
authorization:
rbac: {}
channel: stable
@ -51,7 +53,6 @@ spec:
- 0.0.0.0/0
- ::/0
kubernetesVersion: v1.26.0
masterPublicName: api.ha.example.com
networkCIDR: 172.20.0.0/16
networking:
cni: {}
@ -74,7 +75,7 @@ spec:
zone: us-test-1c
topology:
dns:
type: Public
type: None
---

View File

@ -5,7 +5,9 @@ metadata:
name: ha.example.com
spec:
api:
dns: {}
loadBalancer:
class: Network
type: Public
authorization:
rbac: {}
channel: stable
@ -51,7 +53,6 @@ spec:
- 0.0.0.0/0
- ::/0
kubernetesVersion: v1.21.0
masterPublicName: api.ha.example.com
networkCIDR: 172.20.0.0/16
networking:
cni: {}
@ -74,7 +75,7 @@ spec:
zone: us-test-1c
topology:
dns:
type: Public
type: None
---

View File

@ -5,7 +5,8 @@ metadata:
name: ha-gce.example.com
spec:
api:
dns: {}
loadBalancer:
type: Public
authorization:
rbac: {}
channel: stable
@ -46,7 +47,6 @@ spec:
- 0.0.0.0/0
- ::/0
kubernetesVersion: v1.26.0
masterPublicName: api.ha-gce.example.com
networking:
cni: {}
nonMasqueradeCIDR: 100.64.0.0/10
@ -61,7 +61,7 @@ spec:
type: Public
topology:
dns:
type: Public
type: None
---

View File

@ -5,7 +5,9 @@ metadata:
name: ha.example.com
spec:
api:
dns: {}
loadBalancer:
class: Network
type: Public
authorization:
rbac: {}
channel: stable
@ -51,7 +53,6 @@ spec:
- 0.0.0.0/0
- ::/0
kubernetesVersion: v1.26.0
masterPublicName: api.ha.example.com
networkCIDR: 172.20.0.0/16
networking:
cni: {}
@ -66,7 +67,7 @@ spec:
zone: us-test-1a
topology:
dns:
type: Public
type: None
---

View File

@ -5,7 +5,9 @@ metadata:
name: ha.example.com
spec:
api:
dns: {}
loadBalancer:
class: Network
type: Public
authorization:
rbac: {}
channel: stable
@ -63,7 +65,6 @@ spec:
- 0.0.0.0/0
- ::/0
kubernetesVersion: v1.26.0
masterPublicName: api.ha.example.com
networkCIDR: 172.20.0.0/16
networking:
cni: {}
@ -82,7 +83,7 @@ spec:
zone: us-test-1b
topology:
dns:
type: Public
type: None
---

View File

@ -41,7 +41,6 @@ spec:
- 0.0.0.0/0
- ::/0
kubernetesVersion: v1.26.0
masterPublicName: api.private.example.com
networkCIDR: 172.20.0.0/16
networking:
cni: {}
@ -63,7 +62,7 @@ spec:
bastion:
bastionPublicName: bastion.private.example.com
dns:
type: Public
type: None
---

View File

@ -42,7 +42,6 @@ spec:
- 0.0.0.0/0
- ::/0
kubernetesVersion: v1.22.0
masterPublicName: api.ipv6.example.com
networkCIDR: 172.20.0.0/16
networking:
calico: {}
@ -67,7 +66,7 @@ spec:
zone: us-test-1a
topology:
dns:
type: Public
type: None
---

View File

@ -5,7 +5,9 @@ metadata:
name: karpenter.example.com
spec:
api:
dns: {}
loadBalancer:
class: Network
type: Public
authorization:
rbac: {}
channel: stable
@ -42,7 +44,6 @@ spec:
- 0.0.0.0/0
- ::/0
kubernetesVersion: v1.23.0
masterPublicName: api.karpenter.example.com
networkCIDR: 172.20.0.0/16
networking:
calico: {}
@ -68,7 +69,7 @@ spec:
zone: us-test-1c
topology:
dns:
type: Public
type: None
---

View File

@ -5,7 +5,9 @@ metadata:
name: minimal.example.com
spec:
api:
dns: {}
loadBalancer:
class: Network
type: Public
authorization:
rbac: {}
channel: stable
@ -39,7 +41,6 @@ spec:
- 0.0.0.0/0
- ::/0
kubernetesVersion: v1.24.0
masterPublicName: api.minimal.example.com
networkCIDR: 172.20.0.0/16
networking:
cni: {}
@ -54,7 +55,7 @@ spec:
zone: us-test-1a
topology:
dns:
type: Public
type: None
---

View File

@ -5,7 +5,9 @@ metadata:
name: minimal.example.com
spec:
api:
dns: {}
loadBalancer:
class: Network
type: Public
authorization:
rbac: {}
channel: stable
@ -39,7 +41,6 @@ spec:
- 0.0.0.0/0
- ::/0
kubernetesVersion: v1.25.0
masterPublicName: api.minimal.example.com
networkCIDR: 172.20.0.0/16
networking:
cni: {}
@ -54,7 +55,7 @@ spec:
zone: us-test-1a
topology:
dns:
type: Public
type: None
---

View File

@ -5,7 +5,9 @@ metadata:
name: minimal.example.com
spec:
api:
dns: {}
loadBalancer:
class: Network
type: Public
authorization:
rbac: {}
channel: stable
@ -39,7 +41,6 @@ spec:
- 0.0.0.0/0
- ::/0
kubernetesVersion: v1.26.0
masterPublicName: api.minimal.example.com
networkCIDR: 172.20.0.0/16
networking:
cni: {}
@ -54,7 +55,7 @@ spec:
zone: us-test-1a
topology:
dns:
type: Public
type: None
---

View File

@ -5,7 +5,8 @@ metadata:
name: minimal.example.com
spec:
api:
dns: {}
loadBalancer:
type: Public
authorization:
rbac: {}
channel: stable
@ -38,7 +39,6 @@ spec:
- 0.0.0.0/0
- ::/0
kubernetesVersion: v1.26.0
masterPublicName: api.minimal.example.com
networking:
cni: {}
nonMasqueradeCIDR: 100.64.0.0/10
@ -53,7 +53,7 @@ spec:
type: Public
topology:
dns:
type: Public
type: None
---

View File

@ -5,7 +5,9 @@ metadata:
name: minimal.example.com
spec:
api:
dns: {}
loadBalancer:
class: Network
type: Public
authorization:
rbac: {}
channel: stable
@ -40,7 +42,6 @@ spec:
- 0.0.0.0/0
- ::/0
kubernetesVersion: v1.26.0
masterPublicName: api.minimal.example.com
networkCIDR: 172.20.0.0/16
networking:
cni: {}
@ -58,7 +59,7 @@ spec:
zone: us-test-1a
topology:
dns:
type: Public
type: None
---

View File

@ -5,7 +5,9 @@ metadata:
name: minimal.example.com
spec:
api:
dns: {}
loadBalancer:
class: Network
type: Public
authorization:
rbac: {}
channel: stable
@ -39,7 +41,6 @@ spec:
- 0.0.0.0/0
- ::/0
kubernetesVersion: v1.26.0
masterPublicName: api.minimal.example.com
networkCIDR: 172.20.0.0/16
networking:
cni: {}
@ -54,7 +55,7 @@ spec:
zone: us-test-1a
topology:
dns:
type: Public
type: None
---

View File

@ -5,7 +5,9 @@ metadata:
name: minimal.example.com
spec:
api:
dns: {}
loadBalancer:
class: Network
type: Public
authorization:
rbac: {}
channel: stable
@ -39,7 +41,6 @@ spec:
- 0.0.0.0/0
- ::/0
kubernetesVersion: v1.27.0
masterPublicName: api.minimal.example.com
networkCIDR: 172.20.0.0/16
networking:
cni: {}
@ -54,7 +55,7 @@ spec:
zone: us-test-1a
topology:
dns:
type: Public
type: None
---

View File

@ -5,7 +5,9 @@ metadata:
name: minimal.example.com
spec:
api:
dns: {}
loadBalancer:
class: Network
type: Public
authorization:
rbac: {}
channel: stable
@ -39,7 +41,6 @@ spec:
- 0.0.0.0/0
- ::/0
kubernetesVersion: v1.28.0
masterPublicName: api.minimal.example.com
networkCIDR: 172.20.0.0/16
networking:
cni: {}
@ -54,7 +55,7 @@ spec:
zone: us-test-1a
topology:
dns:
type: Public
type: None
---

View File

@ -5,7 +5,8 @@ metadata:
name: minimal.example.com
spec:
api:
dns: {}
loadBalancer:
type: Public
authorization:
rbac: {}
channel: stable
@ -38,7 +39,6 @@ spec:
- 0.0.0.0/0
- ::/0
kubernetesVersion: v1.29.0
masterPublicName: api.minimal.example.com
networking:
cni: {}
nonMasqueradeCIDR: 100.64.0.0/10
@ -53,7 +53,7 @@ spec:
type: Public
topology:
dns:
type: Public
type: None
---

View File

@ -5,7 +5,9 @@ metadata:
name: minimal.example.com
spec:
api:
dns: {}
loadBalancer:
class: Network
type: Public
authorization:
rbac: {}
channel: stable
@ -39,7 +41,6 @@ spec:
- 0.0.0.0/0
- ::/0
kubernetesVersion: v1.29.0
masterPublicName: api.minimal.example.com
networkCIDR: 172.20.0.0/16
networking:
cni: {}
@ -54,7 +55,7 @@ spec:
zone: us-test-1a
topology:
dns:
type: Public
type: None
---

View File

@ -5,7 +5,9 @@ metadata:
name: minimal.example.com
spec:
api:
dns: {}
loadBalancer:
class: Network
type: Public
authorization:
rbac: {}
channel: stable
@ -63,7 +65,6 @@ spec:
- 0.0.0.0/0
- ::/0
kubernetesVersion: v1.26.0
masterPublicName: api.minimal.example.com
networkCIDR: 172.20.0.0/16
networking:
cni: {}
@ -78,7 +79,7 @@ spec:
zone: us-test-1a
topology:
dns:
type: Public
type: None
---

View File

@ -41,7 +41,6 @@ spec:
- 0.0.0.0/0
- ::/0
kubernetesVersion: v1.26.0
masterPublicName: api.private.example.com
networkCIDR: 172.20.0.0/16
networking:
cni: {}
@ -63,7 +62,7 @@ spec:
bastion:
bastionPublicName: bastion.private.example.com
dns:
type: Public
type: None
---

View File

@ -5,7 +5,9 @@ metadata:
name: overrides.example.com
spec:
api:
dns: {}
loadBalancer:
class: Network
type: Public
authorization:
rbac: {}
channel: stable
@ -39,7 +41,6 @@ spec:
- 0.0.0.0/0
- ::/0
kubernetesVersion: v1.26.0
masterPublicName: api.overrides.example.com
networkCIDR: 172.20.0.0/16
networking:
cni: {}
@ -57,7 +58,7 @@ spec:
zone: us-test-1a
topology:
dns:
type: Public
type: None
---

View File

@ -45,7 +45,6 @@ spec:
- 0.0.0.0/0
- ::/0
kubernetesVersion: v1.26.0
masterPublicName: api.private.example.com
networkCIDR: 172.20.0.0/16
networking:
cni: {}
@ -66,7 +65,7 @@ spec:
bastion:
bastionPublicName: bastion.private.example.com
dns:
type: Public
type: None
---

View File

@ -44,7 +44,6 @@ spec:
- 0.0.0.0/0
- ::/0
kubernetesVersion: v1.26.0
masterPublicName: api.private.example.com
networking:
cni: {}
nonMasqueradeCIDR: 100.64.0.0/10
@ -61,7 +60,7 @@ spec:
bastion:
bastionPublicName: bastion.private.example.com
dns:
type: Public
type: None
---

View File

@ -41,7 +41,6 @@ spec:
- 0.0.0.0/0
- ::/0
kubernetesVersion: v1.26.0
masterPublicName: api.private-subnets.example.com
networkCIDR: 10.0.0.0/12
networkID: vpc-12345678
networking:
@ -63,7 +62,7 @@ spec:
zone: us-test-1a
topology:
dns:
type: Public
type: None
---

View File

@ -5,7 +5,9 @@ metadata:
name: subnet.example.com
spec:
api:
dns: {}
loadBalancer:
class: Network
type: Public
authorization:
rbac: {}
channel: stable
@ -39,7 +41,6 @@ spec:
- 0.0.0.0/0
- ::/0
kubernetesVersion: v1.26.0
masterPublicName: api.subnet.example.com
networkCIDR: 10.0.0.0/12
networkID: vpc-12345678
networking:
@ -56,7 +57,7 @@ spec:
zone: us-test-1a
topology:
dns:
type: Public
type: None
---

View File

@ -5,7 +5,9 @@ metadata:
name: subnet.example.com
spec:
api:
dns: {}
loadBalancer:
class: Network
type: Public
authorization:
rbac: {}
channel: stable
@ -39,7 +41,6 @@ spec:
- 0.0.0.0/0
- ::/0
kubernetesVersion: v1.26.0
masterPublicName: api.subnet.example.com
networkCIDR: 10.0.0.0/12
networkID: vpc-12345678
networking:
@ -56,7 +57,7 @@ spec:
zone: us-test-1a
topology:
dns:
type: Public
type: None
---

View File

@ -5,7 +5,9 @@ metadata:
name: vpc.example.com
spec:
api:
dns: {}
loadBalancer:
class: Network
type: Public
authorization:
rbac: {}
channel: stable
@ -39,7 +41,6 @@ spec:
- 0.0.0.0/0
- ::/0
kubernetesVersion: v1.26.0
masterPublicName: api.vpc.example.com
networkCIDR: 10.0.0.0/12
networkID: vpc-12345678
networking:
@ -55,7 +56,7 @@ spec:
zone: us-test-1a
topology:
dns:
type: Public
type: None
---

View File

@ -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":