Added final review comments

This commit is contained in:
kbhandari 2020-06-16 20:15:32 +00:00
parent a2027755c9
commit 7a71b2932a
3 changed files with 8 additions and 18 deletions

View File

@ -79,4 +79,4 @@ The TransIP Provider minimal TTL is used when the TTL is 0. The minimal TTL is 6
The Vultr provider minimal TTL is used when the TTL is 0. The default is 1 hour. The Vultr provider minimal TTL is used when the TTL is 0. The default is 1 hour.
### UltraDNS ### UltraDNS
The UltraDNS provider minimal TTL is used when the TTL is not given. The default ttl is account level ttl and if account level ttl is not defined then it is 24 hour. The UltraDNS provider minimal TTL is used when the TTL is not provided. The default TTL is account level default TTL, if defined, otherwise 24 hours.

View File

@ -207,7 +207,7 @@ Now that we have verified that ExternalDNS will automatically manage your UltraD
$ kubectl delete service -f nginx.yaml $ kubectl delete service -f nginx.yaml
$ kubectl delete service -f externaldns.yaml $ kubectl delete service -f externaldns.yaml
``` ```
## Example to Manage your Records ## Examples to Manage your Records
### Creating Multiple A Records Target ### Creating Multiple A Records Target
- First, you want to create a service file called 'apple-banana-echo.yaml' - First, you want to create a service file called 'apple-banana-echo.yaml'
```yaml ```yaml

View File

@ -144,16 +144,9 @@ func (p *UltraDNSProvider) Zones(ctx context.Context) ([]udnssdk.Zone, error) {
if p.domainFilter.IsConfigured() { if p.domainFilter.IsConfigured() {
for _, zone := range p.domainFilter.Filters { for _, zone := range p.domainFilter.Filters {
if p.AccountName != "" { zoneKey.Zone = zone
zoneKey.Zone = zone zoneKey.AccountName = p.AccountName
zoneKey.AccountName = p.AccountName zones, err = p.fetchZones(ctx, zoneKey)
zones, err = p.fetchZones(ctx, zoneKey)
} else {
zoneKey.Zone = zone
zones, err = p.fetchZones(ctx, zoneKey)
}
if err != nil { if err != nil {
return nil, err return nil, err
@ -166,10 +159,7 @@ func (p *UltraDNSProvider) Zones(ctx context.Context) ([]udnssdk.Zone, error) {
return zones_appender, nil return zones_appender, nil
} else { } else {
if p.AccountName != "" { zoneKey.AccountName = p.AccountName
zoneKey.AccountName = p.AccountName
}
zones, err := p.fetchZones(ctx, zoneKey) zones, err := p.fetchZones(ctx, zoneKey)
if err != nil { if err != nil {
return nil, err return nil, err
@ -215,7 +205,7 @@ func (p *UltraDNSProvider) Records(ctx context.Context) ([]*endpoint.Endpoint, e
name = zone.Properties.Name name = zone.Properties.Name
} }
endPointTTL := endpoint.NewEndpointWithTTL(name, recordTypeArray[0], endpoint.TTL(r.TTL.(float64)), r.RData...) endPointTTL := endpoint.NewEndpointWithTTL(name, recordTypeArray[0], endpoint.TTL(r.TTL), r.RData...)
endpoints = append(endpoints, endPointTTL) endpoints = append(endpoints, endPointTTL)
} }
} }
@ -438,7 +428,7 @@ func (p *UltraDNSProvider) ApplyChanges(ctx context.Context, changes *plan.Chang
func newUltraDNSChanges(action string, endpoints []*endpoint.Endpoint) []*UltraDNSChanges { func newUltraDNSChanges(action string, endpoints []*endpoint.Endpoint) []*UltraDNSChanges {
changes := make([]*UltraDNSChanges, 0, len(endpoints)) changes := make([]*UltraDNSChanges, 0, len(endpoints))
var ttl interface{} var ttl int
for _, e := range endpoints { for _, e := range endpoints {
if e.RecordTTL.IsConfigured() { if e.RecordTTL.IsConfigured() {