Skip to content

Commit

Permalink
Don't create a CNAME record for the API server
Browse files Browse the repository at this point in the history
  • Loading branch information
asalkeld committed Oct 31, 2019
1 parent c0c3851 commit 3625d5a
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions pkg/fakerp/dns.go
Expand Up @@ -42,22 +42,23 @@ func (dm *dnsManager) createOrUpdateDns(ctx context.Context, cs *api.OpenShiftMa
consoleDnsRecordSet := "openshift"
wildcardRecordSet := "*"
clusterRg := cs.Properties.AzProfile.ResourceGroup

dm.log.Debugf("creating cluster root dns zone %q", clusterRootDnsZone)
err := dm.createOrUpdateZone(ctx, clusterRg, clusterRootDnsZone, dm.dnsResourceGroup, dm.dnsDomain)
if err != nil {
return err
}

dm.log.Debugf("creating CNAME record set %q in dns zone %q", consoleDnsRecordSet, clusterRootDnsZone)
_, err = dm.recordSetsClient.CreateOrUpdate(ctx, clusterRg, clusterRootDnsZone, "openshift", azuredns.CNAME, azuredns.RecordSet{
RecordSetProperties: &azuredns.RecordSetProperties{
CnameRecord: &azuredns.CnameRecord{
Cname: &cs.Properties.FQDN,
if !cs.Properties.PrivateAPIServer {
dm.log.Debugf("creating CNAME record set %q in dns zone %q", consoleDnsRecordSet, clusterRootDnsZone)
_, err = dm.recordSetsClient.CreateOrUpdate(ctx, clusterRg, clusterRootDnsZone, "openshift", azuredns.CNAME, azuredns.RecordSet{
RecordSetProperties: &azuredns.RecordSetProperties{
CnameRecord: &azuredns.CnameRecord{
Cname: &cs.Properties.FQDN,
},
TTL: to.Int64Ptr(60),
},
TTL: to.Int64Ptr(60),
},
}, "", "")
}, "", "")
}

dm.log.Debugf("creating apps dns zone %q", appsDnsZone)
err = dm.createOrUpdateZone(ctx, clusterRg, appsDnsZone, clusterRg, clusterRootDnsZone)
Expand Down

0 comments on commit 3625d5a

Please sign in to comment.