Merge pull request #14538 from hakman/fix_none_dns

Use local API server on control plane nodes for clusters without DNS
This commit is contained in:
Kubernetes Prow Robot 2022-11-12 23:37:56 -08:00 committed by GitHub
commit 35dada5b1f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -35,7 +35,7 @@ func (b *EtcHostsBuilder) Build(c *fi.ModelBuilderContext) error {
Name: "control-plane-address",
}
if b.IsMaster && b.Cluster.IsGossip() {
if b.IsMaster && (b.Cluster.IsGossip() || b.Cluster.UsesNoneDNS()) {
task.Records = append(task.Records, nodetasks.HostRecord{
Hostname: b.Cluster.Spec.MasterInternalName,
Addresses: []string{"127.0.0.1"},