File tree Expand file tree Collapse file tree 8 files changed +19
-17
lines changed Expand file tree Collapse file tree 8 files changed +19
-17
lines changed Original file line number Diff line number Diff line change @@ -3,17 +3,18 @@ package loadbalancer
3
3
import (
4
4
"crypto/tls"
5
5
"fmt"
6
- log "github.com/Sirupsen/logrus"
7
- "github.com/docker/engine-api/client"
8
- "github.com/docker/go-connections/sockets"
9
- "github.com/docker/go-connections/tlsconfig"
10
6
"net/http"
11
7
"os"
12
8
"runtime"
9
+
10
+ log "github.com/Sirupsen/logrus"
11
+ "github.com/docker/docker/client"
12
+ "github.com/docker/go-connections/sockets"
13
+ "github.com/docker/go-connections/tlsconfig"
13
14
)
14
15
15
16
const (
16
- clientVersion = "1.24 "
17
+ clientVersion = "1.25 "
17
18
)
18
19
19
20
// NewDockerClient creates a new API client.
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ package loadbalancer
2
2
3
3
import (
4
4
log "github.com/Sirupsen/logrus"
5
- "github.com/docker/engine-api /client"
5
+ "github.com/docker/docker /client"
6
6
"golang.org/x/net/context"
7
7
)
8
8
Original file line number Diff line number Diff line change @@ -2,11 +2,12 @@ package loadbalancer
2
2
3
3
import (
4
4
"fmt"
5
- log "github.com/Sirupsen/logrus"
6
- "github.com/docker/engine-api/types/swarm"
7
5
"net/url"
8
6
"strconv"
9
7
"strings"
8
+
9
+ log "github.com/Sirupsen/logrus"
10
+ "github.com/docker/docker/api/types/swarm"
10
11
)
11
12
12
13
type listener struct {
@@ -131,7 +132,7 @@ func listenersFromExposedPorts(service swarm.Service) []*listener {
131
132
requestedPublishPorts := map [uint32 ]uint32 {} // key - target port Y (app/container port), value = publish port X
132
133
if service .Spec .EndpointSpec != nil {
133
134
for _ , p := range service .Spec .EndpointSpec .Ports {
134
- if p .PublishedPort > 0 {
135
+ if p .PublishedPort > 0 && strings . EqualFold ( string ( p . PublishMode ), "ingress" ) {
135
136
// Only if the user has specify the desired publish port
136
137
requestedPublishPorts [p .TargetPort ] = p .PublishedPort
137
138
}
Original file line number Diff line number Diff line change 1
1
package loadbalancer
2
2
3
3
import (
4
- "github.com/docker/engine-api /types/swarm"
4
+ "github.com/docker/docker /types/swarm"
5
5
"github.com/stretchr/testify/require"
6
6
"testing"
7
7
)
Original file line number Diff line number Diff line change @@ -2,9 +2,9 @@ package loadbalancer
2
2
3
3
import (
4
4
log "github.com/Sirupsen/logrus"
5
- "github.com/docker/engine- api/client "
6
- "github.com/docker/engine- api/types"
7
- "github.com/docker/engine-api/types/swarm "
5
+ "github.com/docker/docker/ api/types "
6
+ "github.com/docker/docker/ api/types/swarm "
7
+ "github.com/docker/docker/client "
8
8
"golang.org/x/net/context"
9
9
"reflect"
10
10
"sync"
Original file line number Diff line number Diff line change 1
1
package loadbalancer
2
2
3
3
import (
4
- mock_client "github.com/docker/editions/mock/ docker/engine- api/client "
5
- "github.com/docker/engine-api/types/swarm "
4
+ "github.com/docker/docker/api/types/swarm "
5
+ mock_client "github.com/docker/editions/mock/docker/docker/client "
6
6
"github.com/golang/mock/gomock"
7
7
"github.com/stretchr/testify/require"
8
8
"golang.org/x/net/context"
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ package loadbalancer
3
3
import (
4
4
"fmt"
5
5
log "github.com/Sirupsen/logrus"
6
- "github.com/docker/engine- api/types/swarm"
6
+ "github.com/docker/docker/ api/types/swarm"
7
7
"time"
8
8
)
9
9
Original file line number Diff line number Diff line change 1
1
package loadbalancer
2
2
3
3
import (
4
- "github.com/docker/engine- api/types/swarm"
4
+ "github.com/docker/docker/ api/types/swarm"
5
5
"github.com/stretchr/testify/require"
6
6
"testing"
7
7
)
You can’t perform that action at this time.
0 commit comments