mirror of
https://github.com/kubernetes-sigs/external-dns.git
synced 2026-05-05 06:36:11 +02:00
Address remove comments
This commit is contained in:
parent
a70d8010b5
commit
03c3c8fcb8
@ -297,10 +297,10 @@ func endpointsFromIngress(ing *v1beta1.Ingress, ignoreHostnameAnnotation bool, i
|
||||
|
||||
// Include endpoints according to the hostname source annotation in our final list
|
||||
var endpoints []*endpoint.Endpoint
|
||||
if strings.ToLower(hostnameSourceAnnotation) != IngressHostnameSourceAnnotationOnlyValue {
|
||||
if strings.ToLower(hostnameSourceAnnotation) == IngressHostnameSourceDefinedHostsOnlyValue {
|
||||
endpoints = append(endpoints, definedHostsEndpoints...)
|
||||
}
|
||||
if strings.ToLower(hostnameSourceAnnotation) != IngressHostnameSourceDefinedHostsOnlyValue {
|
||||
if strings.ToLower(hostnameSourceAnnotation) == IngressHostnameSourceAnnotationOnlyValue {
|
||||
endpoints = append(endpoints, annotationEndpoints...)
|
||||
}
|
||||
return endpoints
|
||||
|
||||
@ -268,10 +268,10 @@ func testEndpointsFromIngressHostnameSourceAnnotation(t *testing.T) {
|
||||
},
|
||||
},
|
||||
{
|
||||
title: "Ingress-hostname-source=all, one rule.host, one annotation host",
|
||||
title: "No ingress-hostname-source annotation, one rule.host, one annotation host",
|
||||
ingress: fakeIngress{
|
||||
dnsnames: []string{"foo.bar"},
|
||||
annotations: map[string]string{hostnameAnnotationKey: "foo.baz", ingressHostnameSourceKey: "all"},
|
||||
annotations: map[string]string{hostnameAnnotationKey: "foo.baz"},
|
||||
hostnames: []string{"lb.com"},
|
||||
},
|
||||
expected: []*endpoint.Endpoint{
|
||||
|
||||
@ -49,7 +49,6 @@ const (
|
||||
// The annotation used to determine the source of hostnames for ingresses
|
||||
ingressHostnameSourceKey = "external-dns.alpha.kubernetes.io/ingress-hostname-source"
|
||||
// The value of the controller annotation so that we feel responsible
|
||||
// The value of the controller annotation so that we feel responsible
|
||||
controllerAnnotationValue = "dns-controller"
|
||||
// The annotation used for defining the desired hostname
|
||||
internalHostnameAnnotationKey = "external-dns.alpha.kubernetes.io/internal-hostname"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user