Merge pull request #464 from justinsb/fix_dns_zone_matching

When validating DNS names, ignoring trailing dot
This commit is contained in:
Justin Santa Barbara 2016-09-19 10:21:59 -04:00 committed by GitHub
commit 04a7d74091
1 changed files with 3 additions and 2 deletions

View File

@ -548,10 +548,11 @@ func validateDNS(cluster *api.Cluster, cloud fi.Cloud) error {
}
var matches []dnsprovider.Zone
findName := strings.TrimSuffix(cluster.Spec.DNSZone, ".")
for _, zone := range zones {
id := zone.ID()
name := zone.Name()
if id == cluster.Spec.DNSZone || name == cluster.Spec.DNSZone {
name := strings.TrimSuffix(zone.Name(), ".")
if id == cluster.Spec.DNSZone || name == findName {
matches = append(matches, zone)
}
}