bluecat: do not return if owner not found

We were returning an error when the owner string was not found and this was causing the loop to quit. This is not ideal because it does not fetch the other records once it returns.
This commit is contained in:
Jaideep Bellani 2021-07-19 16:13:22 -05:00
parent f2f8681c24
commit 2f0149097d

View File

@ -215,7 +215,7 @@ func (p *BluecatProvider) Records(ctx context.Context) (endpoints []*endpoint.En
tempEndpoint := endpoint.NewEndpoint(rec.Name, endpoint.RecordTypeTXT, rec.Properties) tempEndpoint := endpoint.NewEndpoint(rec.Name, endpoint.RecordTypeTXT, rec.Properties)
tempEndpoint.Labels[endpoint.OwnerLabelKey], err = extractOwnerfromTXTRecord(rec.Properties) tempEndpoint.Labels[endpoint.OwnerLabelKey], err = extractOwnerfromTXTRecord(rec.Properties)
if err != nil { if err != nil {
return nil, errors.Wrapf(err, "Error fetching owner from record") log.Debugf("External DNS Owner %s", err)
} }
endpoints = append(endpoints, tempEndpoint) endpoints = append(endpoints, tempEndpoint)
} }
@ -243,7 +243,7 @@ func (p *BluecatProvider) Records(ctx context.Context) (endpoints []*endpoint.En
if strings.Compare(rec.Name, txtRec.Name) == 0 { if strings.Compare(rec.Name, txtRec.Name) == 0 {
ep.Labels[endpoint.OwnerLabelKey], err = extractOwnerfromTXTRecord(txtRec.Properties) ep.Labels[endpoint.OwnerLabelKey], err = extractOwnerfromTXTRecord(txtRec.Properties)
if err != nil { if err != nil {
return nil, errors.Wrapf(err, "owner not parsed correctly") log.Debugf("External DNS Owner %s", err)
} }
} }
} }
@ -272,7 +272,7 @@ func (p *BluecatProvider) Records(ctx context.Context) (endpoints []*endpoint.En
if strings.Compare(rec.Name, txtRec.Name) == 0 { if strings.Compare(rec.Name, txtRec.Name) == 0 {
ep.Labels[endpoint.OwnerLabelKey], err = extractOwnerfromTXTRecord(txtRec.Properties) ep.Labels[endpoint.OwnerLabelKey], err = extractOwnerfromTXTRecord(txtRec.Properties)
if err != nil { if err != nil {
return nil, errors.Wrapf(err, "owner not parsed correctly") log.Debugf("External DNS Owner %s", err)
} }
} }
} }