diff --git a/docs/usage/11-provisioning-tcp-cloud-loadbalancers.adoc b/docs/usage/11-provisioning-tcp-cloud-loadbalancers.adoc index 905e154..ab3b664 100644 --- a/docs/usage/11-provisioning-tcp-cloud-loadbalancers.adoc +++ b/docs/usage/11-provisioning-tcp-cloud-loadbalancers.adoc @@ -73,7 +73,7 @@ To configure an AWS NLB, the value of the `.cloudProviderConfiguration` field mu ---- { "aws": { - "elb": [{ + "elbs": [{ "type": "NLB", "name": "", "internal": , diff --git a/go.mod b/go.mod index b006240..7a34ac3 100644 --- a/go.mod +++ b/go.mod @@ -22,7 +22,7 @@ require ( github.com/imdario/mergo v0.3.6 // indirect github.com/json-iterator/go v1.1.5 // indirect github.com/kr/pretty v0.1.0 // indirect - github.com/mesosphere/dcos-edge-lb v1.3.2-0.20190618110118-50a400af8d6f + github.com/mesosphere/dcos-edge-lb v1.3.2-0.20190628160932-d3547ca23ba9 github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.1 // indirect github.com/mongodb/mongo-go-driver v0.1.0 diff --git a/go.sum b/go.sum index 322fe42..0bdc6c2 100644 --- a/go.sum +++ b/go.sum @@ -116,6 +116,8 @@ github.com/mesosphere/dcos-edge-lb v1.3.2-0.20190524045551-0e0d955a0325 h1:gqlVF github.com/mesosphere/dcos-edge-lb v1.3.2-0.20190524045551-0e0d955a0325/go.mod h1:+p1l5IpJ27w9tnm4MY1yOLHCtu2sh6EoLUPTsGEYrjo= github.com/mesosphere/dcos-edge-lb v1.3.2-0.20190618110118-50a400af8d6f h1:JM2honGf/OS+14RXRPGc2uOHSjjJVuzouv3UnVLHL4o= github.com/mesosphere/dcos-edge-lb v1.3.2-0.20190618110118-50a400af8d6f/go.mod h1:+p1l5IpJ27w9tnm4MY1yOLHCtu2sh6EoLUPTsGEYrjo= +github.com/mesosphere/dcos-edge-lb v1.3.2-0.20190628160932-d3547ca23ba9 h1:Pkf3sS2A6RC+JIC5j1HtiCvaHzE8OWeZ8zE8uBxJ2EU= +github.com/mesosphere/dcos-edge-lb v1.3.2-0.20190628160932-d3547ca23ba9/go.mod h1:+p1l5IpJ27w9tnm4MY1yOLHCtu2sh6EoLUPTsGEYrjo= github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= github.com/mitchellh/mapstructure v1.1.2 h1:fmNYVwqnSfB9mZU6OS2O6GsXM+wcskZDuKQzvN1EDeE= diff --git a/make/edgelb.mk b/make/edgelb.mk index 589908b..8166382 100644 --- a/make/edgelb.mk +++ b/make/edgelb.mk @@ -5,7 +5,7 @@ EDGELB_PACKAGE_NAME := edgelb EDGELB_SERVICE_ACCOUNT_NAME := edgelb-principal # EDGELB_PACKAGE_VERSION sets the required package version -EDGELB_PACKAGE_VERSION := v1.3.1-235-g50a400a +EDGELB_PACKAGE_VERSION := v1.3.1-269-g316af7d .PHONY: edgelb.package.install edgelb.package.install: dcos.setup-security.edgelb diff --git a/pkg/translator/status.go b/pkg/translator/status.go index f3ef189..a35a81c 100644 --- a/pkg/translator/status.go +++ b/pkg/translator/status.go @@ -34,29 +34,31 @@ func computeLoadBalancerStatus(manager manager.EdgeLBManager, poolName string, o publicIPs = make(map[string]bool) ) // Add all reported DNS names to the set of DNS names. - for _, elb := range m.Elb { - if elb.DNS != "" { - for _, listener := range elb.Listeners { - // Check whether the target frontend belongs to the Service/Ingress resource being processed. - if listener.LinkFrontend == nil { - continue - } - var ( - isOwnedByObj bool - ) - switch t := obj.(type) { - case *corev1.Service: - m, err := computeServiceOwnedEdgeLBObjectMetadata(*listener.LinkFrontend) - isOwnedByObj = err == nil && m.IsOwnedBy(t) - case *extsv1beta1.Ingress: - m, err := computeIngressOwnedEdgeLBObjectMetadata(*listener.LinkFrontend) - isOwnedByObj = err == nil && m.IsOwnedBy(t) - default: - return nil - } - // If the target frontend belongs to the Service/Ingress resource being processed, we add the DNS name of the ELB being processed. - if isOwnedByObj { - dnsNames[strings.ToLower(elb.DNS)] = true + if m.Aws != nil { + for _, elb := range m.Aws.Elbs { + if elb.DNS != "" { + for _, listener := range elb.Listeners { + // Check whether the target frontend belongs to the Service/Ingress resource being processed. + if listener.LinkFrontend == nil { + continue + } + var ( + isOwnedByObj bool + ) + switch t := obj.(type) { + case *corev1.Service: + m, err := computeServiceOwnedEdgeLBObjectMetadata(*listener.LinkFrontend) + isOwnedByObj = err == nil && m.IsOwnedBy(t) + case *extsv1beta1.Ingress: + m, err := computeIngressOwnedEdgeLBObjectMetadata(*listener.LinkFrontend) + isOwnedByObj = err == nil && m.IsOwnedBy(t) + default: + return nil + } + // If the target frontend belongs to the Service/Ingress resource being processed, we add the DNS name of the ELB being processed. + if isOwnedByObj { + dnsNames[strings.ToLower(elb.DNS)] = true + } } } } diff --git a/test/e2e/service_cloud_loadbalancer_test.go b/test/e2e/service_cloud_loadbalancer_test.go index 9728c3b..bfcad29 100644 --- a/test/e2e/service_cloud_loadbalancer_test.go +++ b/test/e2e/service_cloud_loadbalancer_test.go @@ -125,7 +125,7 @@ var _ = Describe("Service", func() { // Create the desired cloud-provider configuration. redisCfgBytes, _ := json.Marshal(&models.V2CloudProvider{ Aws: &models.V2CloudProviderAws{ - Elb: []*models.V2CloudProviderAwsElb{ + Elbs: []*models.V2CloudProviderAwsElb{ { Internal: pointers.NewBool(false), Listeners: []*models.V2CloudProviderAwsElbListener{