mirror of
https://github.com/kubernetes-sigs/external-dns.git
synced 2026-05-05 06:36:11 +02:00
Fixed unused assignment
Signed-off-by: João Marçal <joao.marcal12@gmail.com>
This commit is contained in:
parent
6bf1c2bcb5
commit
9f6ebfa06d
@ -110,7 +110,6 @@ func NewCRDSource(crdClient rest.Interface, namespace, kind string, scheme *runt
|
||||
// Endpoints returns endpoint objects.
|
||||
func (cs *crdSource) Endpoints() ([]*endpoint.Endpoint, error) {
|
||||
endpoints := []*endpoint.Endpoint{}
|
||||
crdEndpoints := []*endpoint.Endpoint{}
|
||||
|
||||
result, err := cs.List(&metav1.ListOptions{})
|
||||
if err != nil {
|
||||
@ -119,7 +118,7 @@ func (cs *crdSource) Endpoints() ([]*endpoint.Endpoint, error) {
|
||||
|
||||
for _, dnsEndpoint := range result.Items {
|
||||
// Make sure that all endpoints have targets for A or CNAME type
|
||||
crdEndpoints = []*endpoint.Endpoint{}
|
||||
crdEndpoints := []*endpoint.Endpoint{}
|
||||
for _, ep := range dnsEndpoint.Spec.Endpoints {
|
||||
if (ep.RecordType == "CNAME" || ep.RecordType == "A") && len(ep.Targets) < 1 {
|
||||
log.Warnf("Endpoint %s with DNSName %s has an empty list of targets", dnsEndpoint.ObjectMeta.Name, ep.DNSName)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user