Merge branch v3.3 into master
This commit is contained in:
commit
30fe11eccf
100 changed files with 13204 additions and 916 deletions
|
@ -5,7 +5,8 @@ import (
|
|||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/aws/aws-sdk-go/service/ec2"
|
||||
ec2types "github.com/aws/aws-sdk-go-v2/service/ec2/types"
|
||||
ecstypes "github.com/aws/aws-sdk-go-v2/service/ecs/types"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
ptypes "github.com/traefik/paerser/types"
|
||||
|
@ -31,10 +32,10 @@ func TestDefaultRule(t *testing.T) {
|
|||
id("1"),
|
||||
labels(map[string]string{}),
|
||||
iMachine(
|
||||
mState(ec2.InstanceStateNameRunning),
|
||||
mState(ec2types.InstanceStateNameRunning),
|
||||
mPrivateIP("10.0.0.1"),
|
||||
mPorts(
|
||||
mPort(0, 1337, "TCP"),
|
||||
mPort(0, 1337, ecstypes.TransportProtocolTcp),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
@ -90,10 +91,10 @@ func TestDefaultRule(t *testing.T) {
|
|||
name("Test"),
|
||||
labels(map[string]string{}),
|
||||
iMachine(
|
||||
mState(ec2.InstanceStateNameRunning),
|
||||
mState(ec2types.InstanceStateNameRunning),
|
||||
mPrivateIP("127.0.0.1"),
|
||||
mPorts(
|
||||
mPort(0, 80, "tcp"),
|
||||
mPort(0, 80, ecstypes.TransportProtocolTcp),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
@ -151,10 +152,10 @@ func TestDefaultRule(t *testing.T) {
|
|||
"traefik.domain": "foo.bar",
|
||||
}),
|
||||
iMachine(
|
||||
mState(ec2.InstanceStateNameRunning),
|
||||
mState(ec2types.InstanceStateNameRunning),
|
||||
mPrivateIP("127.0.0.1"),
|
||||
mPorts(
|
||||
mPort(0, 80, "tcp"),
|
||||
mPort(0, 80, ecstypes.TransportProtocolTcp),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
@ -210,10 +211,10 @@ func TestDefaultRule(t *testing.T) {
|
|||
name("Test"),
|
||||
labels(map[string]string{}),
|
||||
iMachine(
|
||||
mState(ec2.InstanceStateNameRunning),
|
||||
mState(ec2types.InstanceStateNameRunning),
|
||||
mPrivateIP("127.0.0.1"),
|
||||
mPorts(
|
||||
mPort(0, 80, "tcp"),
|
||||
mPort(0, 80, ecstypes.TransportProtocolTcp),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
@ -263,10 +264,10 @@ func TestDefaultRule(t *testing.T) {
|
|||
name("Test"),
|
||||
labels(map[string]string{}),
|
||||
iMachine(
|
||||
mState(ec2.InstanceStateNameRunning),
|
||||
mState(ec2types.InstanceStateNameRunning),
|
||||
mPrivateIP("127.0.0.1"),
|
||||
mPorts(
|
||||
mPort(0, 80, "tcp"),
|
||||
mPort(0, 80, ecstypes.TransportProtocolTcp),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
@ -316,10 +317,10 @@ func TestDefaultRule(t *testing.T) {
|
|||
name("Test"),
|
||||
labels(map[string]string{}),
|
||||
iMachine(
|
||||
mState(ec2.InstanceStateNameRunning),
|
||||
mState(ec2types.InstanceStateNameRunning),
|
||||
mPrivateIP("127.0.0.1"),
|
||||
mPorts(
|
||||
mPort(0, 80, "tcp"),
|
||||
mPort(0, 80, ecstypes.TransportProtocolTcp),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
@ -412,10 +413,10 @@ func Test_buildConfiguration(t *testing.T) {
|
|||
"traefik.http.services.test": "",
|
||||
}),
|
||||
iMachine(
|
||||
mState(ec2.InstanceStateNameRunning),
|
||||
mState(ec2types.InstanceStateNameRunning),
|
||||
mPrivateIP("127.0.0.1"),
|
||||
mPorts(
|
||||
mPort(0, 80, "tcp"),
|
||||
mPort(0, 80, ecstypes.TransportProtocolTcp),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
@ -451,10 +452,10 @@ func Test_buildConfiguration(t *testing.T) {
|
|||
"traefik.tcp.services.test": "",
|
||||
}),
|
||||
iMachine(
|
||||
mState(ec2.InstanceStateNameRunning),
|
||||
mState(ec2types.InstanceStateNameRunning),
|
||||
mPrivateIP("127.0.0.1"),
|
||||
mPorts(
|
||||
mPort(0, 80, "tcp"),
|
||||
mPort(0, 80, ecstypes.TransportProtocolTcp),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
@ -490,10 +491,10 @@ func Test_buildConfiguration(t *testing.T) {
|
|||
"traefik.udp.services.test": "",
|
||||
}),
|
||||
iMachine(
|
||||
mState(ec2.InstanceStateNameRunning),
|
||||
mState(ec2types.InstanceStateNameRunning),
|
||||
mPrivateIP("127.0.0.1"),
|
||||
mPorts(
|
||||
mPort(0, 80, "tcp"),
|
||||
mPort(0, 80, ecstypes.TransportProtocolTcp),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
@ -527,10 +528,10 @@ func Test_buildConfiguration(t *testing.T) {
|
|||
name("Test"),
|
||||
labels(map[string]string{}),
|
||||
iMachine(
|
||||
mState(ec2.InstanceStateNameRunning),
|
||||
mState(ec2types.InstanceStateNameRunning),
|
||||
mPrivateIP("127.0.0.1"),
|
||||
mPorts(
|
||||
mPort(0, 80, "tcp"),
|
||||
mPort(0, 80, ecstypes.TransportProtocolTcp),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
@ -585,10 +586,10 @@ func Test_buildConfiguration(t *testing.T) {
|
|||
name("Test"),
|
||||
labels(map[string]string{}),
|
||||
iMachine(
|
||||
mState(ec2.InstanceStateNameRunning),
|
||||
mState(ec2types.InstanceStateNameRunning),
|
||||
mPrivateIP("127.0.0.1"),
|
||||
mPorts(
|
||||
mPort(0, 80, "tcp"),
|
||||
mPort(0, 80, ecstypes.TransportProtocolTcp),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
@ -596,10 +597,10 @@ func Test_buildConfiguration(t *testing.T) {
|
|||
name("Test2"),
|
||||
labels(map[string]string{}),
|
||||
iMachine(
|
||||
mState(ec2.InstanceStateNameRunning),
|
||||
mState(ec2types.InstanceStateNameRunning),
|
||||
mPrivateIP("127.0.0.2"),
|
||||
mPorts(
|
||||
mPort(0, 80, "tcp"),
|
||||
mPort(0, 80, ecstypes.TransportProtocolTcp),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
@ -674,10 +675,10 @@ func Test_buildConfiguration(t *testing.T) {
|
|||
name("Test"),
|
||||
labels(map[string]string{}),
|
||||
iMachine(
|
||||
mState(ec2.InstanceStateNameRunning),
|
||||
mState(ec2types.InstanceStateNameRunning),
|
||||
mPrivateIP("127.0.0.1"),
|
||||
mPorts(
|
||||
mPort(0, 80, "tcp"),
|
||||
mPort(0, 80, ecstypes.TransportProtocolTcp),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
@ -686,10 +687,10 @@ func Test_buildConfiguration(t *testing.T) {
|
|||
name("Test"),
|
||||
labels(map[string]string{}),
|
||||
iMachine(
|
||||
mState(ec2.InstanceStateNameRunning),
|
||||
mState(ec2types.InstanceStateNameRunning),
|
||||
mPrivateIP("127.0.0.2"),
|
||||
mPorts(
|
||||
mPort(0, 80, "tcp"),
|
||||
mPort(0, 80, ecstypes.TransportProtocolTcp),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
@ -749,10 +750,10 @@ func Test_buildConfiguration(t *testing.T) {
|
|||
"traefik.http.services.Service1.loadbalancer.passhostheader": "true",
|
||||
}),
|
||||
iMachine(
|
||||
mState(ec2.InstanceStateNameRunning),
|
||||
mState(ec2types.InstanceStateNameRunning),
|
||||
mPrivateIP("127.0.0.1"),
|
||||
mPorts(
|
||||
mPort(0, 80, "tcp"),
|
||||
mPort(0, 80, ecstypes.TransportProtocolTcp),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
@ -811,10 +812,10 @@ func Test_buildConfiguration(t *testing.T) {
|
|||
"traefik.http.routers.Router1.service": "Service1",
|
||||
}),
|
||||
iMachine(
|
||||
mState(ec2.InstanceStateNameRunning),
|
||||
mState(ec2types.InstanceStateNameRunning),
|
||||
mPrivateIP("127.0.0.1"),
|
||||
mPorts(
|
||||
mPort(0, 80, "tcp"),
|
||||
mPort(0, 80, ecstypes.TransportProtocolTcp),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
@ -870,10 +871,10 @@ func Test_buildConfiguration(t *testing.T) {
|
|||
"traefik.http.routers.Router1.rule": "Host(`foo.com`)",
|
||||
}),
|
||||
iMachine(
|
||||
mState(ec2.InstanceStateNameRunning),
|
||||
mState(ec2types.InstanceStateNameRunning),
|
||||
mPrivateIP("127.0.0.1"),
|
||||
mPorts(
|
||||
mPort(0, 80, "tcp"),
|
||||
mPort(0, 80, ecstypes.TransportProtocolTcp),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
@ -930,10 +931,10 @@ func Test_buildConfiguration(t *testing.T) {
|
|||
"traefik.http.services.Service1.loadbalancer.passhostheader": "true",
|
||||
}),
|
||||
iMachine(
|
||||
mState(ec2.InstanceStateNameRunning),
|
||||
mState(ec2types.InstanceStateNameRunning),
|
||||
mPrivateIP("127.0.0.1"),
|
||||
mPorts(
|
||||
mPort(0, 80, "tcp"),
|
||||
mPort(0, 80, ecstypes.TransportProtocolTcp),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
@ -991,10 +992,10 @@ func Test_buildConfiguration(t *testing.T) {
|
|||
"traefik.http.services.Service2.loadbalancer.passhostheader": "true",
|
||||
}),
|
||||
iMachine(
|
||||
mState(ec2.InstanceStateNameRunning),
|
||||
mState(ec2types.InstanceStateNameRunning),
|
||||
mPrivateIP("127.0.0.1"),
|
||||
mPorts(
|
||||
mPort(0, 80, "tcp"),
|
||||
mPort(0, 80, ecstypes.TransportProtocolTcp),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
@ -1060,10 +1061,10 @@ func Test_buildConfiguration(t *testing.T) {
|
|||
"traefik.http.routers.Router1.service": "Service1",
|
||||
}),
|
||||
iMachine(
|
||||
mState(ec2.InstanceStateNameRunning),
|
||||
mState(ec2types.InstanceStateNameRunning),
|
||||
mPrivateIP("127.0.0.1"),
|
||||
mPorts(
|
||||
mPort(0, 80, "tcp"),
|
||||
mPort(0, 80, ecstypes.TransportProtocolTcp),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
@ -1120,10 +1121,10 @@ func Test_buildConfiguration(t *testing.T) {
|
|||
"traefik.http.services.Service1.loadbalancer.passhostheader": "true",
|
||||
}),
|
||||
iMachine(
|
||||
mState(ec2.InstanceStateNameRunning),
|
||||
mState(ec2types.InstanceStateNameRunning),
|
||||
mPrivateIP("127.0.0.1"),
|
||||
mPorts(
|
||||
mPort(0, 80, "tcp"),
|
||||
mPort(0, 80, ecstypes.TransportProtocolTcp),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
@ -1134,10 +1135,10 @@ func Test_buildConfiguration(t *testing.T) {
|
|||
"traefik.http.services.Service1.loadbalancer.passhostheader": "false",
|
||||
}),
|
||||
iMachine(
|
||||
mState(ec2.InstanceStateNameRunning),
|
||||
mState(ec2types.InstanceStateNameRunning),
|
||||
mPrivateIP("127.0.0.1"),
|
||||
mPorts(
|
||||
mPort(0, 80, "tcp"),
|
||||
mPort(0, 80, ecstypes.TransportProtocolTcp),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
@ -1180,10 +1181,10 @@ func Test_buildConfiguration(t *testing.T) {
|
|||
"traefik.http.services.Service1.loadbalancer.passhostheader": "false",
|
||||
}),
|
||||
iMachine(
|
||||
mState(ec2.InstanceStateNameRunning),
|
||||
mState(ec2types.InstanceStateNameRunning),
|
||||
mPrivateIP("127.0.0.1"),
|
||||
mPorts(
|
||||
mPort(0, 80, "tcp"),
|
||||
mPort(0, 80, ecstypes.TransportProtocolTcp),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
@ -1194,10 +1195,10 @@ func Test_buildConfiguration(t *testing.T) {
|
|||
"traefik.http.services.Service1.loadbalancer.passhostheader": "true",
|
||||
}),
|
||||
iMachine(
|
||||
mState(ec2.InstanceStateNameRunning),
|
||||
mState(ec2types.InstanceStateNameRunning),
|
||||
mPrivateIP("127.0.0.1"),
|
||||
mPorts(
|
||||
mPort(0, 80, "tcp"),
|
||||
mPort(0, 80, ecstypes.TransportProtocolTcp),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
@ -1208,10 +1209,10 @@ func Test_buildConfiguration(t *testing.T) {
|
|||
"traefik.http.services.Service1.loadbalancer.passhostheader": "true",
|
||||
}),
|
||||
iMachine(
|
||||
mState(ec2.InstanceStateNameRunning),
|
||||
mState(ec2types.InstanceStateNameRunning),
|
||||
mPrivateIP("127.0.0.1"),
|
||||
mPorts(
|
||||
mPort(0, 80, "tcp"),
|
||||
mPort(0, 80, ecstypes.TransportProtocolTcp),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
@ -1254,10 +1255,10 @@ func Test_buildConfiguration(t *testing.T) {
|
|||
"traefik.http.services.Service1.loadbalancer.passhostheader": "true",
|
||||
}),
|
||||
iMachine(
|
||||
mState(ec2.InstanceStateNameRunning),
|
||||
mState(ec2types.InstanceStateNameRunning),
|
||||
mPrivateIP("127.0.0.1"),
|
||||
mPorts(
|
||||
mPort(0, 80, "tcp"),
|
||||
mPort(0, 80, ecstypes.TransportProtocolTcp),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
@ -1268,10 +1269,10 @@ func Test_buildConfiguration(t *testing.T) {
|
|||
"traefik.http.services.Service1.loadbalancer.passhostheader": "true",
|
||||
}),
|
||||
iMachine(
|
||||
mState(ec2.InstanceStateNameRunning),
|
||||
mState(ec2types.InstanceStateNameRunning),
|
||||
mPrivateIP("127.0.0.2"),
|
||||
mPorts(
|
||||
mPort(0, 80, "tcp"),
|
||||
mPort(0, 80, ecstypes.TransportProtocolTcp),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
@ -1331,10 +1332,10 @@ func Test_buildConfiguration(t *testing.T) {
|
|||
"traefik.http.middlewares.Middleware1.inflightreq.amount": "42",
|
||||
}),
|
||||
iMachine(
|
||||
mState(ec2.InstanceStateNameRunning),
|
||||
mState(ec2types.InstanceStateNameRunning),
|
||||
mPrivateIP("127.0.0.1"),
|
||||
mPorts(
|
||||
mPort(0, 80, "tcp"),
|
||||
mPort(0, 80, ecstypes.TransportProtocolTcp),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
@ -1398,10 +1399,10 @@ func Test_buildConfiguration(t *testing.T) {
|
|||
"traefik.http.middlewares.Middleware1.inflightreq.amount": "42",
|
||||
}),
|
||||
iMachine(
|
||||
mState(ec2.InstanceStateNameRunning),
|
||||
mState(ec2types.InstanceStateNameRunning),
|
||||
mPrivateIP("127.0.0.1"),
|
||||
mPorts(
|
||||
mPort(0, 80, "tcp"),
|
||||
mPort(0, 80, ecstypes.TransportProtocolTcp),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
@ -1412,10 +1413,10 @@ func Test_buildConfiguration(t *testing.T) {
|
|||
"traefik.http.middlewares.Middleware1.inflightreq.amount": "42",
|
||||
}),
|
||||
iMachine(
|
||||
mState(ec2.InstanceStateNameRunning),
|
||||
mState(ec2types.InstanceStateNameRunning),
|
||||
mPrivateIP("127.0.0.2"),
|
||||
mPorts(
|
||||
mPort(0, 80, "tcp"),
|
||||
mPort(0, 80, ecstypes.TransportProtocolTcp),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
@ -1482,10 +1483,10 @@ func Test_buildConfiguration(t *testing.T) {
|
|||
"traefik.http.middlewares.Middleware1.inflightreq.amount": "42",
|
||||
}),
|
||||
iMachine(
|
||||
mState(ec2.InstanceStateNameRunning),
|
||||
mState(ec2types.InstanceStateNameRunning),
|
||||
mPrivateIP("127.0.0.1"),
|
||||
mPorts(
|
||||
mPort(0, 80, "tcp"),
|
||||
mPort(0, 80, ecstypes.TransportProtocolTcp),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
@ -1496,10 +1497,10 @@ func Test_buildConfiguration(t *testing.T) {
|
|||
"traefik.http.middlewares.Middleware1.inflightreq.amount": "41",
|
||||
}),
|
||||
iMachine(
|
||||
mState(ec2.InstanceStateNameRunning),
|
||||
mState(ec2types.InstanceStateNameRunning),
|
||||
mPrivateIP("127.0.0.2"),
|
||||
mPorts(
|
||||
mPort(0, 80, "tcp"),
|
||||
mPort(0, 80, ecstypes.TransportProtocolTcp),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
@ -1560,10 +1561,10 @@ func Test_buildConfiguration(t *testing.T) {
|
|||
"traefik.http.middlewares.Middleware1.inflightreq.amount": "42",
|
||||
}),
|
||||
iMachine(
|
||||
mState(ec2.InstanceStateNameRunning),
|
||||
mState(ec2types.InstanceStateNameRunning),
|
||||
mPrivateIP("127.0.0.1"),
|
||||
mPorts(
|
||||
mPort(0, 80, "tcp"),
|
||||
mPort(0, 80, ecstypes.TransportProtocolTcp),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
@ -1574,10 +1575,10 @@ func Test_buildConfiguration(t *testing.T) {
|
|||
"traefik.http.middlewares.Middleware1.inflightreq.amount": "41",
|
||||
}),
|
||||
iMachine(
|
||||
mState(ec2.InstanceStateNameRunning),
|
||||
mState(ec2types.InstanceStateNameRunning),
|
||||
mPrivateIP("127.0.0.2"),
|
||||
mPorts(
|
||||
mPort(0, 80, "tcp"),
|
||||
mPort(0, 80, ecstypes.TransportProtocolTcp),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
@ -1588,10 +1589,10 @@ func Test_buildConfiguration(t *testing.T) {
|
|||
"traefik.http.middlewares.Middleware1.inflightreq.amount": "40",
|
||||
}),
|
||||
iMachine(
|
||||
mState(ec2.InstanceStateNameRunning),
|
||||
mState(ec2types.InstanceStateNameRunning),
|
||||
mPrivateIP("127.0.0.3"),
|
||||
mPorts(
|
||||
mPort(0, 80, "tcp"),
|
||||
mPort(0, 80, ecstypes.TransportProtocolTcp),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
@ -1655,10 +1656,10 @@ func Test_buildConfiguration(t *testing.T) {
|
|||
"traefik.http.routers.Router1.rule": "Host(`foo.com`)",
|
||||
}),
|
||||
iMachine(
|
||||
mState(ec2.InstanceStateNameRunning),
|
||||
mState(ec2types.InstanceStateNameRunning),
|
||||
mPrivateIP("127.0.0.1"),
|
||||
mPorts(
|
||||
mPort(0, 80, "tcp"),
|
||||
mPort(0, 80, ecstypes.TransportProtocolTcp),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
@ -1669,10 +1670,10 @@ func Test_buildConfiguration(t *testing.T) {
|
|||
"traefik.http.routers.Router1.rule": "Host(`bar.com`)",
|
||||
}),
|
||||
iMachine(
|
||||
mState(ec2.InstanceStateNameRunning),
|
||||
mState(ec2types.InstanceStateNameRunning),
|
||||
mPrivateIP("127.0.0.2"),
|
||||
mPorts(
|
||||
mPort(0, 80, "tcp"),
|
||||
mPort(0, 80, ecstypes.TransportProtocolTcp),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
@ -1727,10 +1728,10 @@ func Test_buildConfiguration(t *testing.T) {
|
|||
"traefik.http.routers.Router1.rule": "Host(`foo.com`)",
|
||||
}),
|
||||
iMachine(
|
||||
mState(ec2.InstanceStateNameRunning),
|
||||
mState(ec2types.InstanceStateNameRunning),
|
||||
mPrivateIP("127.0.0.1"),
|
||||
mPorts(
|
||||
mPort(0, 80, "tcp"),
|
||||
mPort(0, 80, ecstypes.TransportProtocolTcp),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
@ -1741,10 +1742,10 @@ func Test_buildConfiguration(t *testing.T) {
|
|||
"traefik.http.routers.Router1.rule": "Host(`bar.com`)",
|
||||
}),
|
||||
iMachine(
|
||||
mState(ec2.InstanceStateNameRunning),
|
||||
mState(ec2types.InstanceStateNameRunning),
|
||||
mPrivateIP("127.0.0.2"),
|
||||
mPorts(
|
||||
mPort(0, 80, "tcp"),
|
||||
mPort(0, 80, ecstypes.TransportProtocolTcp),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
@ -1755,10 +1756,10 @@ func Test_buildConfiguration(t *testing.T) {
|
|||
"traefik.http.routers.Router1.rule": "Host(`foobar.com`)",
|
||||
}),
|
||||
iMachine(
|
||||
mState(ec2.InstanceStateNameRunning),
|
||||
mState(ec2types.InstanceStateNameRunning),
|
||||
mPrivateIP("127.0.0.3"),
|
||||
mPorts(
|
||||
mPort(0, 80, "tcp"),
|
||||
mPort(0, 80, ecstypes.TransportProtocolTcp),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
@ -1816,10 +1817,10 @@ func Test_buildConfiguration(t *testing.T) {
|
|||
"traefik.http.routers.Router1.rule": "Host(`foo.com`)",
|
||||
}),
|
||||
iMachine(
|
||||
mState(ec2.InstanceStateNameRunning),
|
||||
mState(ec2types.InstanceStateNameRunning),
|
||||
mPrivateIP("127.0.0.1"),
|
||||
mPorts(
|
||||
mPort(0, 80, "tcp"),
|
||||
mPort(0, 80, ecstypes.TransportProtocolTcp),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
@ -1831,10 +1832,10 @@ func Test_buildConfiguration(t *testing.T) {
|
|||
"traefik.http.routers.Router1.rule": "Host(`foo.com`)",
|
||||
}),
|
||||
iMachine(
|
||||
mState(ec2.InstanceStateNameRunning),
|
||||
mState(ec2types.InstanceStateNameRunning),
|
||||
mPrivateIP("127.0.0.2"),
|
||||
mPorts(
|
||||
mPort(0, 80, "tcp"),
|
||||
mPort(0, 80, ecstypes.TransportProtocolTcp),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
@ -1893,10 +1894,10 @@ func Test_buildConfiguration(t *testing.T) {
|
|||
"traefik.http.routers.Router1.rule": "Host(`foo.com`)",
|
||||
}),
|
||||
iMachine(
|
||||
mState(ec2.InstanceStateNameRunning),
|
||||
mState(ec2types.InstanceStateNameRunning),
|
||||
mPrivateIP("127.0.0.1"),
|
||||
mPorts(
|
||||
mPort(0, 80, "tcp"),
|
||||
mPort(0, 80, ecstypes.TransportProtocolTcp),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
@ -1906,10 +1907,10 @@ func Test_buildConfiguration(t *testing.T) {
|
|||
"traefik.http.routers.Router1.rule": "Host(`foo.com`)",
|
||||
}),
|
||||
iMachine(
|
||||
mState(ec2.InstanceStateNameRunning),
|
||||
mState(ec2types.InstanceStateNameRunning),
|
||||
mPrivateIP("127.0.0.2"),
|
||||
mPorts(
|
||||
mPort(0, 80, "tcp"),
|
||||
mPort(0, 80, ecstypes.TransportProtocolTcp),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
@ -1974,10 +1975,10 @@ func Test_buildConfiguration(t *testing.T) {
|
|||
"traefik.wrong.label": "42",
|
||||
}),
|
||||
iMachine(
|
||||
mState(ec2.InstanceStateNameRunning),
|
||||
mState(ec2types.InstanceStateNameRunning),
|
||||
mPrivateIP("127.0.0.1"),
|
||||
mPorts(
|
||||
mPort(0, 80, "tcp"),
|
||||
mPort(0, 80, ecstypes.TransportProtocolTcp),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
@ -2035,10 +2036,10 @@ func Test_buildConfiguration(t *testing.T) {
|
|||
"traefik.http.services.Service1.LoadBalancer.server.port": "80",
|
||||
}),
|
||||
iMachine(
|
||||
mState(ec2.InstanceStateNameRunning),
|
||||
mState(ec2types.InstanceStateNameRunning),
|
||||
mPrivateIP("127.0.0.1"),
|
||||
mPorts(
|
||||
mPort(80, 8080, "tcp"),
|
||||
mPort(80, 8080, ecstypes.TransportProtocolTcp),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
@ -2095,7 +2096,7 @@ func Test_buildConfiguration(t *testing.T) {
|
|||
"traefik.http.services.Service1.LoadBalancer.server.url": "http://1.2.3.4:5678",
|
||||
}),
|
||||
iMachine(
|
||||
mState(ec2.InstanceStateNameRunning),
|
||||
mState(ec2types.InstanceStateNameRunning),
|
||||
mPrivateIP("127.0.0.1"),
|
||||
mPorts(
|
||||
mPort(80, 8080, "tcp"),
|
||||
|
@ -2156,7 +2157,7 @@ func Test_buildConfiguration(t *testing.T) {
|
|||
"traefik.http.services.Service1.LoadBalancer.server.preservepath": "true",
|
||||
}),
|
||||
iMachine(
|
||||
mState(ec2.InstanceStateNameRunning),
|
||||
mState(ec2types.InstanceStateNameRunning),
|
||||
mPrivateIP("127.0.0.1"),
|
||||
mPorts(
|
||||
mPort(80, 8080, "tcp"),
|
||||
|
@ -2218,7 +2219,7 @@ func Test_buildConfiguration(t *testing.T) {
|
|||
"traefik.http.services.Service1.LoadBalancer.server.port": "1234",
|
||||
}),
|
||||
iMachine(
|
||||
mState(ec2.InstanceStateNameRunning),
|
||||
mState(ec2types.InstanceStateNameRunning),
|
||||
mPrivateIP("127.0.0.1"),
|
||||
mPorts(
|
||||
mPort(80, 8080, "tcp"),
|
||||
|
@ -2258,7 +2259,7 @@ func Test_buildConfiguration(t *testing.T) {
|
|||
"traefik.http.services.Service1.LoadBalancer.server.scheme": "https",
|
||||
}),
|
||||
iMachine(
|
||||
mState(ec2.InstanceStateNameRunning),
|
||||
mState(ec2types.InstanceStateNameRunning),
|
||||
mPrivateIP("127.0.0.1"),
|
||||
mPorts(
|
||||
mPort(80, 8080, "tcp"),
|
||||
|
@ -2298,10 +2299,10 @@ func Test_buildConfiguration(t *testing.T) {
|
|||
"traefik.http.services.Service1.LoadBalancer.server.port": "8040",
|
||||
}),
|
||||
iMachine(
|
||||
mState(ec2.InstanceStateNameRunning),
|
||||
mState(ec2types.InstanceStateNameRunning),
|
||||
mPrivateIP("127.0.0.1"),
|
||||
mPorts(
|
||||
mPort(80, 8080, "tcp"),
|
||||
mPort(80, 8080, ecstypes.TransportProtocolTcp),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
@ -2363,11 +2364,11 @@ func Test_buildConfiguration(t *testing.T) {
|
|||
"traefik.http.services.Service2.LoadBalancer.server.port": "4444",
|
||||
}),
|
||||
iMachine(
|
||||
mState(ec2.InstanceStateNameRunning),
|
||||
mState(ec2types.InstanceStateNameRunning),
|
||||
mPrivateIP("127.0.0.1"),
|
||||
mPorts(
|
||||
mPort(4444, 32123, "tcp"),
|
||||
mPort(4445, 32124, "tcp"),
|
||||
mPort(4444, 32123, ecstypes.TransportProtocolTcp),
|
||||
mPort(4445, 32124, ecstypes.TransportProtocolTcp),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
@ -2442,10 +2443,10 @@ func Test_buildConfiguration(t *testing.T) {
|
|||
"traefik.http.services.Service2.LoadBalancer.server.port": "8080",
|
||||
}),
|
||||
iMachine(
|
||||
mState(ec2.InstanceStateNameRunning),
|
||||
mState(ec2types.InstanceStateNameRunning),
|
||||
mPrivateIP("127.0.0.1"),
|
||||
mPorts(
|
||||
mPort(0, 80, "tcp"),
|
||||
mPort(0, 80, ecstypes.TransportProtocolTcp),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
@ -2508,7 +2509,7 @@ func Test_buildConfiguration(t *testing.T) {
|
|||
name("Test"),
|
||||
labels(map[string]string{}),
|
||||
iMachine(
|
||||
mState(ec2.InstanceStateNameRunning),
|
||||
mState(ec2types.InstanceStateNameRunning),
|
||||
mPrivateIP("127.0.0.1"),
|
||||
mPorts(),
|
||||
),
|
||||
|
@ -2545,7 +2546,7 @@ func Test_buildConfiguration(t *testing.T) {
|
|||
"traefik.http.middlewares.Middleware1.inflightreq.amount": "42",
|
||||
}),
|
||||
iMachine(
|
||||
mState(ec2.InstanceStateNameRunning),
|
||||
mState(ec2types.InstanceStateNameRunning),
|
||||
mPrivateIP("127.0.0.1"),
|
||||
mPorts(),
|
||||
),
|
||||
|
@ -2582,10 +2583,10 @@ func Test_buildConfiguration(t *testing.T) {
|
|||
"traefik.enable": "false",
|
||||
}),
|
||||
iMachine(
|
||||
mState(ec2.InstanceStateNameRunning),
|
||||
mState(ec2types.InstanceStateNameRunning),
|
||||
mPrivateIP("127.0.0.1"),
|
||||
mPorts(
|
||||
mPort(0, 80, "tcp"),
|
||||
mPort(0, 80, ecstypes.TransportProtocolTcp),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
@ -2621,11 +2622,11 @@ func Test_buildConfiguration(t *testing.T) {
|
|||
"traefik.enable": "false",
|
||||
}),
|
||||
iMachine(
|
||||
mState(ec2.InstanceStateNameRunning),
|
||||
mState(ec2types.InstanceStateNameRunning),
|
||||
mPrivateIP("127.0.0.1"),
|
||||
mHealthStatus("UNHEALTHY"),
|
||||
mHealthStatus(ecstypes.HealthStatusUnhealthy),
|
||||
mPorts(
|
||||
mPort(0, 80, "tcp"),
|
||||
mPort(0, 80, ecstypes.TransportProtocolTcp),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
@ -2661,10 +2662,10 @@ func Test_buildConfiguration(t *testing.T) {
|
|||
"traefik.enable": "false",
|
||||
}),
|
||||
iMachine(
|
||||
mState(ec2.InstanceStateNamePending),
|
||||
mState(ec2types.InstanceStateNamePending),
|
||||
mPrivateIP("127.0.0.1"),
|
||||
mPorts(
|
||||
mPort(0, 80, "tcp"),
|
||||
mPort(0, 80, ecstypes.TransportProtocolTcp),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
@ -2700,10 +2701,10 @@ func Test_buildConfiguration(t *testing.T) {
|
|||
"traefik.tags": "foo",
|
||||
}),
|
||||
iMachine(
|
||||
mState(ec2.InstanceStateNameRunning),
|
||||
mState(ec2types.InstanceStateNameRunning),
|
||||
mPrivateIP("127.0.0.1"),
|
||||
mPorts(
|
||||
mPort(0, 80, "tcp"),
|
||||
mPort(0, 80, ecstypes.TransportProtocolTcp),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
@ -2740,10 +2741,10 @@ func Test_buildConfiguration(t *testing.T) {
|
|||
"traefik.tags": "foo",
|
||||
}),
|
||||
iMachine(
|
||||
mState(ec2.InstanceStateNameRunning),
|
||||
mState(ec2types.InstanceStateNameRunning),
|
||||
mPrivateIP("127.0.0.1"),
|
||||
mPorts(
|
||||
mPort(0, 80, "tcp"),
|
||||
mPort(0, 80, ecstypes.TransportProtocolTcp),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
@ -2802,10 +2803,10 @@ func Test_buildConfiguration(t *testing.T) {
|
|||
"traefik.http.routers.Test.middlewares": "Middleware1",
|
||||
}),
|
||||
iMachine(
|
||||
mState(ec2.InstanceStateNameRunning),
|
||||
mState(ec2types.InstanceStateNameRunning),
|
||||
mPrivateIP("127.0.0.1"),
|
||||
mPorts(
|
||||
mPort(0, 80, "tcp"),
|
||||
mPort(0, 80, ecstypes.TransportProtocolTcp),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
@ -2874,10 +2875,10 @@ func Test_buildConfiguration(t *testing.T) {
|
|||
"traefik.tcp.routers.Test.middlewares": "Middleware1",
|
||||
}),
|
||||
iMachine(
|
||||
mState(ec2.InstanceStateNameRunning),
|
||||
mState(ec2types.InstanceStateNameRunning),
|
||||
mPrivateIP("127.0.0.1"),
|
||||
mPorts(
|
||||
mPort(0, 80, "tcp"),
|
||||
mPort(0, 80, ecstypes.TransportProtocolTcp),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
@ -2936,10 +2937,10 @@ func Test_buildConfiguration(t *testing.T) {
|
|||
"traefik.tcp.routers.foo.tls": "true",
|
||||
}),
|
||||
iMachine(
|
||||
mState(ec2.InstanceStateNameRunning),
|
||||
mState(ec2types.InstanceStateNameRunning),
|
||||
mPrivateIP("127.0.0.1"),
|
||||
mPorts(
|
||||
mPort(0, 80, "tcp"),
|
||||
mPort(0, 80, ecstypes.TransportProtocolTcp),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
@ -2991,10 +2992,10 @@ func Test_buildConfiguration(t *testing.T) {
|
|||
"traefik.udp.routers.foo.entrypoints": "mydns",
|
||||
}),
|
||||
iMachine(
|
||||
mState(ec2.InstanceStateNameRunning),
|
||||
mState(ec2types.InstanceStateNameRunning),
|
||||
mPrivateIP("127.0.0.1"),
|
||||
mPorts(
|
||||
mPort(0, 80, "udp"),
|
||||
mPort(0, 80, ecstypes.TransportProtocolUdp),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
@ -3045,10 +3046,10 @@ func Test_buildConfiguration(t *testing.T) {
|
|||
"traefik.tcp.routers.foo.tls": "true",
|
||||
}),
|
||||
iMachine(
|
||||
mState(ec2.InstanceStateNameRunning),
|
||||
mState(ec2types.InstanceStateNameRunning),
|
||||
mPrivateIP("127.0.0.1"),
|
||||
mPorts(
|
||||
mPort(0, 80, "tcp"),
|
||||
mPort(0, 80, ecstypes.TransportProtocolTcp),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
@ -3096,10 +3097,10 @@ func Test_buildConfiguration(t *testing.T) {
|
|||
"traefik.tcp.services.foo.loadbalancer.server.port": "80",
|
||||
}),
|
||||
iMachine(
|
||||
mState(ec2.InstanceStateNameRunning),
|
||||
mState(ec2types.InstanceStateNameRunning),
|
||||
mPrivateIP("127.0.0.1"),
|
||||
mPorts(
|
||||
mPort(80, 8080, "tcp"),
|
||||
mPort(80, 8080, ecstypes.TransportProtocolTcp),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
@ -3154,10 +3155,10 @@ func Test_buildConfiguration(t *testing.T) {
|
|||
"traefik.udp.services.foo.loadbalancer.server.port": "80",
|
||||
}),
|
||||
iMachine(
|
||||
mState(ec2.InstanceStateNameRunning),
|
||||
mState(ec2types.InstanceStateNameRunning),
|
||||
mPrivateIP("127.0.0.1"),
|
||||
mPorts(
|
||||
mPort(80, 8080, "udp"),
|
||||
mPort(80, 8080, ecstypes.TransportProtocolUdp),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
@ -3210,10 +3211,10 @@ func Test_buildConfiguration(t *testing.T) {
|
|||
"traefik.http.services.Service1.loadbalancer.passhostheader": "true",
|
||||
}),
|
||||
iMachine(
|
||||
mState(ec2.InstanceStateNameRunning),
|
||||
mState(ec2types.InstanceStateNameRunning),
|
||||
mPrivateIP("127.0.0.1"),
|
||||
mPorts(
|
||||
mPort(0, 80, "tcp"),
|
||||
mPort(0, 80, ecstypes.TransportProtocolTcp),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
@ -3226,10 +3227,10 @@ func Test_buildConfiguration(t *testing.T) {
|
|||
"traefik.http.services.Service1.loadbalancer.passhostheader": "true",
|
||||
}),
|
||||
iMachine(
|
||||
mState(ec2.InstanceStateNameRunning),
|
||||
mState(ec2types.InstanceStateNameRunning),
|
||||
mPrivateIP("127.0.0.2"),
|
||||
mPorts(
|
||||
mPort(0, 80, "tcp"),
|
||||
mPort(0, 80, ecstypes.TransportProtocolTcp),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
@ -3307,10 +3308,10 @@ func Test_buildConfiguration(t *testing.T) {
|
|||
"traefik.udp.services.foo.loadbalancer.server.port": "8080",
|
||||
}),
|
||||
iMachine(
|
||||
mState(ec2.InstanceStateNameRunning),
|
||||
mState(ec2types.InstanceStateNameRunning),
|
||||
mPrivateIP("127.0.0.1"),
|
||||
mPorts(
|
||||
mPort(0, 80, "tcp"),
|
||||
mPort(0, 80, ecstypes.TransportProtocolTcp),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
@ -3357,10 +3358,10 @@ func Test_buildConfiguration(t *testing.T) {
|
|||
"traefik.tcp.services.foo.loadbalancer.server.port": "80",
|
||||
}),
|
||||
iMachine(
|
||||
mState(ec2.InstanceStateNameRunning),
|
||||
mState(ec2types.InstanceStateNameRunning),
|
||||
mPrivateIP("127.0.0.1"),
|
||||
mPorts(
|
||||
mPort(80, 8080, "tcp"),
|
||||
mPort(80, 8080, ecstypes.TransportProtocolTcp),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
@ -3408,10 +3409,10 @@ func Test_buildConfiguration(t *testing.T) {
|
|||
"traefik.tls.stores.default.defaultgeneratedcert.domain.sans": "foobar, fiibar",
|
||||
}),
|
||||
iMachine(
|
||||
mState(ec2.InstanceStateNameRunning),
|
||||
mState(ec2types.InstanceStateNameRunning),
|
||||
mPrivateIP("127.0.0.1"),
|
||||
mPorts(
|
||||
mPort(0, 80, "tcp"),
|
||||
mPort(0, 80, ecstypes.TransportProtocolTcp),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue