Skip to content

Commit

Permalink
Added comment about filter
Browse files Browse the repository at this point in the history
Signed-off-by: JoaoBraveCoding <joao.marcal12@gmail.com>
  • Loading branch information
JoaoBraveCoding committed May 15, 2020
1 parent 33e8e9d commit e1a4641
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion source/crd.go
Original file line number Diff line number Diff line change
Expand Up @@ -125,12 +125,13 @@ func (cs *crdSource) Endpoints() ([]*endpoint.Endpoint, error) {
result *endpoint.DNSEndpointList
err error
)

// Filter DNSEnpoints by label if filter provided
if cs.labelFilter != "" {
result, err = cs.List(&metav1.ListOptions{LabelSelector: cs.labelFilter})
} else {
result, err = cs.List(&metav1.ListOptions{})
}

if err != nil {
return nil, err
}
Expand Down

0 comments on commit e1a4641

Please sign in to comment.