Update go version
This commit is contained in:
parent
74ace58ae1
commit
48e7a87741
18 changed files with 90 additions and 83 deletions
|
@ -13,7 +13,7 @@ You need to run the `binary` target. This will create binaries for Linux platfor
|
|||
$ make binary
|
||||
docker build -t "traefik-dev:no-more-godep-ever" -f build.Dockerfile .
|
||||
Sending build context to Docker daemon 295.3 MB
|
||||
Step 0 : FROM golang:1.10-alpine
|
||||
Step 0 : FROM golang:1.11-alpine
|
||||
---> 8c6473912976
|
||||
Step 1 : RUN go get github.com/golang/dep/cmd/dep
|
||||
[...]
|
||||
|
|
2
Gopkg.lock
generated
2
Gopkg.lock
generated
|
@ -1272,7 +1272,7 @@
|
|||
"roundrobin",
|
||||
"utils"
|
||||
]
|
||||
revision = "f6bbeac6d5c4c06f88ba07ed42983ff36a5b407e"
|
||||
revision = "77148e9694210e5f5610328f1cd7cf65583014c2"
|
||||
|
||||
[[projects]]
|
||||
name = "github.com/vulcand/predicate"
|
||||
|
|
|
@ -213,7 +213,7 @@ func TestDo_globalConfiguration(t *testing.T) {
|
|||
MustMatch: true,
|
||||
},
|
||||
},
|
||||
Trace: true,
|
||||
Trace: true,
|
||||
DebugLogGeneratedTemplate: true,
|
||||
},
|
||||
Endpoint: "docker Endpoint",
|
||||
|
@ -244,7 +244,7 @@ func TestDo_globalConfiguration(t *testing.T) {
|
|||
MustMatch: true,
|
||||
},
|
||||
},
|
||||
Trace: true,
|
||||
Trace: true,
|
||||
DebugLogGeneratedTemplate: true,
|
||||
},
|
||||
Directory: "file Directory",
|
||||
|
@ -309,7 +309,7 @@ func TestDo_globalConfiguration(t *testing.T) {
|
|||
MustMatch: true,
|
||||
},
|
||||
},
|
||||
Trace: true,
|
||||
Trace: true,
|
||||
DebugLogGeneratedTemplate: true,
|
||||
},
|
||||
Endpoint: "",
|
||||
|
@ -349,7 +349,7 @@ func TestDo_globalConfiguration(t *testing.T) {
|
|||
MustMatch: true,
|
||||
},
|
||||
},
|
||||
Trace: true,
|
||||
Trace: true,
|
||||
DebugLogGeneratedTemplate: true,
|
||||
},
|
||||
Endpoint: "ConsulCatalog Endpoint",
|
||||
|
@ -374,7 +374,7 @@ func TestDo_globalConfiguration(t *testing.T) {
|
|||
MustMatch: true,
|
||||
},
|
||||
},
|
||||
Trace: true,
|
||||
Trace: true,
|
||||
DebugLogGeneratedTemplate: true,
|
||||
},
|
||||
Endpoint: "k8s Endpoint",
|
||||
|
@ -400,7 +400,7 @@ func TestDo_globalConfiguration(t *testing.T) {
|
|||
MustMatch: true,
|
||||
},
|
||||
},
|
||||
Trace: true,
|
||||
Trace: true,
|
||||
DebugLogGeneratedTemplate: true,
|
||||
},
|
||||
Endpoint: "mesos Endpoint",
|
||||
|
@ -429,7 +429,7 @@ func TestDo_globalConfiguration(t *testing.T) {
|
|||
MustMatch: true,
|
||||
},
|
||||
},
|
||||
Trace: true,
|
||||
Trace: true,
|
||||
DebugLogGeneratedTemplate: true,
|
||||
},
|
||||
Endpoint: "eureka Endpoint",
|
||||
|
@ -452,7 +452,7 @@ func TestDo_globalConfiguration(t *testing.T) {
|
|||
MustMatch: true,
|
||||
},
|
||||
},
|
||||
Trace: true,
|
||||
Trace: true,
|
||||
DebugLogGeneratedTemplate: true,
|
||||
},
|
||||
Domain: "ecs Domain",
|
||||
|
@ -481,7 +481,7 @@ func TestDo_globalConfiguration(t *testing.T) {
|
|||
MustMatch: true,
|
||||
},
|
||||
},
|
||||
Trace: true,
|
||||
Trace: true,
|
||||
DebugLogGeneratedTemplate: true,
|
||||
},
|
||||
APIConfiguration: rancher.APIConfiguration{
|
||||
|
@ -519,7 +519,7 @@ func TestDo_globalConfiguration(t *testing.T) {
|
|||
MustMatch: true,
|
||||
},
|
||||
},
|
||||
Trace: true,
|
||||
Trace: true,
|
||||
DebugLogGeneratedTemplate: true,
|
||||
},
|
||||
AccessKeyID: "dynamodb AccessKeyID",
|
||||
|
@ -546,7 +546,7 @@ func TestDo_globalConfiguration(t *testing.T) {
|
|||
MustMatch: true,
|
||||
},
|
||||
},
|
||||
Trace: true,
|
||||
Trace: true,
|
||||
DebugLogGeneratedTemplate: true,
|
||||
},
|
||||
Endpoint: "etcd Endpoint",
|
||||
|
@ -578,7 +578,7 @@ func TestDo_globalConfiguration(t *testing.T) {
|
|||
MustMatch: true,
|
||||
},
|
||||
},
|
||||
Trace: true,
|
||||
Trace: true,
|
||||
DebugLogGeneratedTemplate: true,
|
||||
},
|
||||
Endpoint: "zk Endpoint",
|
||||
|
@ -610,7 +610,7 @@ func TestDo_globalConfiguration(t *testing.T) {
|
|||
MustMatch: true,
|
||||
},
|
||||
},
|
||||
Trace: true,
|
||||
Trace: true,
|
||||
DebugLogGeneratedTemplate: true,
|
||||
},
|
||||
Endpoint: "boltdb Endpoint",
|
||||
|
@ -642,7 +642,7 @@ func TestDo_globalConfiguration(t *testing.T) {
|
|||
MustMatch: true,
|
||||
},
|
||||
},
|
||||
Trace: true,
|
||||
Trace: true,
|
||||
DebugLogGeneratedTemplate: true,
|
||||
},
|
||||
Endpoint: "consul Endpoint",
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
FROM golang:1.10-alpine
|
||||
FROM golang:1.11-alpine
|
||||
|
||||
RUN apk --update upgrade \
|
||||
&& apk --no-cache --no-progress add git mercurial bash gcc musl-dev curl tar \
|
||||
|
|
|
@ -94,7 +94,7 @@ func NewCmd(traefikConfiguration *cmd.TraefikConfiguration, traefikPointersConfi
|
|||
Description: `Report an issue on Traefik bugtracker`,
|
||||
Config: traefikConfiguration,
|
||||
DefaultPointersConfig: traefikPointersConfiguration,
|
||||
Run: runCmd(traefikConfiguration),
|
||||
Run: runCmd(traefikConfiguration),
|
||||
Metadata: map[string]string{
|
||||
"parseAllSources": "true",
|
||||
},
|
||||
|
|
|
@ -20,7 +20,7 @@ func NewCmd(traefikConfiguration *cmd.TraefikConfiguration, traefikPointersConfi
|
|||
Description: `Calls traefik /ping to check health (web provider must be enabled)`,
|
||||
Config: traefikConfiguration,
|
||||
DefaultPointersConfig: traefikPointersConfiguration,
|
||||
Run: runCmd(traefikConfiguration),
|
||||
Run: runCmd(traefikConfiguration),
|
||||
Metadata: map[string]string{
|
||||
"parseAllSources": "true",
|
||||
},
|
||||
|
|
|
@ -67,19 +67,19 @@ func Test_parseEntryPointsConfiguration(t *testing.T) {
|
|||
"ca_optional": "true",
|
||||
"compress": "true",
|
||||
"forwardedheaders_trustedips": "10.0.0.3/24,20.0.0.3/24",
|
||||
"name": "foo",
|
||||
"proxyprotocol_trustedips": "192.168.0.1",
|
||||
"redirect_entrypoint": "https",
|
||||
"redirect_permanent": "true",
|
||||
"redirect_regex": "http://localhost/(.*)",
|
||||
"redirect_replacement": "http://mydomain/$1",
|
||||
"tls": "goo,gii",
|
||||
"tls_acme": "TLS",
|
||||
"tls_ciphersuites": "TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA384,TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305,TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA,TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA",
|
||||
"tls_minversion": "VersionTLS11",
|
||||
"whitelistsourcerange": "10.42.0.0/16,152.89.1.33/32,afed:be44::/16",
|
||||
"whitelist_sourcerange": "10.42.0.0/16,152.89.1.33/32,afed:be44::/16",
|
||||
"whitelist_usexforwardedfor": "true",
|
||||
"name": "foo",
|
||||
"proxyprotocol_trustedips": "192.168.0.1",
|
||||
"redirect_entrypoint": "https",
|
||||
"redirect_permanent": "true",
|
||||
"redirect_regex": "http://localhost/(.*)",
|
||||
"redirect_replacement": "http://mydomain/$1",
|
||||
"tls": "goo,gii",
|
||||
"tls_acme": "TLS",
|
||||
"tls_ciphersuites": "TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA384,TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305,TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA,TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA",
|
||||
"tls_minversion": "VersionTLS11",
|
||||
"whitelistsourcerange": "10.42.0.0/16,152.89.1.33/32,afed:be44::/16",
|
||||
"whitelist_sourcerange": "10.42.0.0/16,152.89.1.33/32,afed:be44::/16",
|
||||
"whitelist_usexforwardedfor": "true",
|
||||
},
|
||||
},
|
||||
{
|
||||
|
|
|
@ -118,7 +118,7 @@ func (hc *HealthCheck) execute(ctx context.Context, backend *BackendConfig) {
|
|||
for {
|
||||
select {
|
||||
case <-ctx.Done():
|
||||
log.Debug("Stopping current health check goroutines of backend: %s", backend.name)
|
||||
log.Debugf("Stopping current health check goroutines of backend: %s", backend.name)
|
||||
return
|
||||
case <-ticker.C:
|
||||
log.Debugf("Refreshing health check for backend: %s", backend.name)
|
||||
|
|
|
@ -192,28 +192,28 @@ func TestLoggerJSON(t *testing.T) {
|
|||
Format: JSONFormat,
|
||||
},
|
||||
expected: map[string]func(t *testing.T, value interface{}){
|
||||
RequestHost: assertString(testHostname),
|
||||
RequestAddr: assertString(testHostname),
|
||||
RequestMethod: assertString(testMethod),
|
||||
RequestPath: assertString(testPath),
|
||||
RequestProtocol: assertString(testProto),
|
||||
RequestPort: assertString("-"),
|
||||
RequestLine: assertString(fmt.Sprintf("%s %s %s", testMethod, testPath, testProto)),
|
||||
DownstreamStatus: assertFloat64(float64(testStatus)),
|
||||
DownstreamStatusLine: assertString(fmt.Sprintf("%d ", testStatus)),
|
||||
DownstreamContentSize: assertFloat64(float64(len(testContent))),
|
||||
OriginContentSize: assertFloat64(float64(len(testContent))),
|
||||
OriginStatus: assertFloat64(float64(testStatus)),
|
||||
RequestRefererHeader: assertString(testReferer),
|
||||
RequestUserAgentHeader: assertString(testUserAgent),
|
||||
FrontendName: assertString(testFrontendName),
|
||||
BackendURL: assertString(testBackendName),
|
||||
ClientUsername: assertString(testUsername),
|
||||
ClientHost: assertString(testHostname),
|
||||
ClientPort: assertString(fmt.Sprintf("%d", testPort)),
|
||||
ClientAddr: assertString(fmt.Sprintf("%s:%d", testHostname, testPort)),
|
||||
"level": assertString("info"),
|
||||
"msg": assertString(""),
|
||||
RequestHost: assertString(testHostname),
|
||||
RequestAddr: assertString(testHostname),
|
||||
RequestMethod: assertString(testMethod),
|
||||
RequestPath: assertString(testPath),
|
||||
RequestProtocol: assertString(testProto),
|
||||
RequestPort: assertString("-"),
|
||||
RequestLine: assertString(fmt.Sprintf("%s %s %s", testMethod, testPath, testProto)),
|
||||
DownstreamStatus: assertFloat64(float64(testStatus)),
|
||||
DownstreamStatusLine: assertString(fmt.Sprintf("%d ", testStatus)),
|
||||
DownstreamContentSize: assertFloat64(float64(len(testContent))),
|
||||
OriginContentSize: assertFloat64(float64(len(testContent))),
|
||||
OriginStatus: assertFloat64(float64(testStatus)),
|
||||
RequestRefererHeader: assertString(testReferer),
|
||||
RequestUserAgentHeader: assertString(testUserAgent),
|
||||
FrontendName: assertString(testFrontendName),
|
||||
BackendURL: assertString(testBackendName),
|
||||
ClientUsername: assertString(testUsername),
|
||||
ClientHost: assertString(testHostname),
|
||||
ClientPort: assertString(fmt.Sprintf("%d", testPort)),
|
||||
ClientAddr: assertString(fmt.Sprintf("%s:%d", testHostname, testPort)),
|
||||
"level": assertString("info"),
|
||||
"msg": assertString(""),
|
||||
"downstream_Content-Type": assertString("text/plain; charset=utf-8"),
|
||||
RequestCount: assertFloat64NotZero(),
|
||||
Duration: assertFloat64NotZero(),
|
||||
|
@ -234,9 +234,9 @@ func TestLoggerJSON(t *testing.T) {
|
|||
},
|
||||
},
|
||||
expected: map[string]func(t *testing.T, value interface{}){
|
||||
"level": assertString("info"),
|
||||
"msg": assertString(""),
|
||||
"time": assertNotEqual(""),
|
||||
"level": assertString("info"),
|
||||
"msg": assertString(""),
|
||||
"time": assertNotEqual(""),
|
||||
"downstream_Content-Type": assertString("text/plain; charset=utf-8"),
|
||||
RequestRefererHeader: assertString(testReferer),
|
||||
RequestUserAgentHeader: assertString(testUserAgent),
|
||||
|
@ -273,9 +273,9 @@ func TestLoggerJSON(t *testing.T) {
|
|||
},
|
||||
},
|
||||
expected: map[string]func(t *testing.T, value interface{}){
|
||||
"level": assertString("info"),
|
||||
"msg": assertString(""),
|
||||
"time": assertNotEqual(""),
|
||||
"level": assertString("info"),
|
||||
"msg": assertString(""),
|
||||
"time": assertNotEqual(""),
|
||||
"downstream_Content-Type": assertString("REDACTED"),
|
||||
RequestRefererHeader: assertString("REDACTED"),
|
||||
RequestUserAgentHeader: assertString("REDACTED"),
|
||||
|
|
|
@ -45,7 +45,7 @@ func (wl *IPWhiteLister) handle(w http.ResponseWriter, r *http.Request, next htt
|
|||
return
|
||||
}
|
||||
|
||||
tracing.SetErrorAndDebugLog(r, "request %+v matched white list %s - passing", r, wl.whiteLister)
|
||||
tracing.SetErrorAndDebugLog(r, "request %+v matched white list %v - passing", r, wl.whiteLister)
|
||||
next.ServeHTTP(w, r)
|
||||
}
|
||||
|
||||
|
|
|
@ -126,7 +126,7 @@ func (rr *retryResponseWriterWithoutCloseNotify) Header() http.Header {
|
|||
|
||||
func (rr *retryResponseWriterWithoutCloseNotify) Write(buf []byte) (int, error) {
|
||||
if rr.ShouldRetry() {
|
||||
return 0, nil
|
||||
return len(buf), nil
|
||||
}
|
||||
return rr.responseWriter.Write(buf)
|
||||
}
|
||||
|
|
|
@ -386,7 +386,7 @@ func (p *Provider) lookupEc2Instances(ctx context.Context, client *awsClient, cl
|
|||
})
|
||||
|
||||
if err != nil {
|
||||
log.Errorf("Unable to describe instances [%s]: %v", err)
|
||||
log.Errorf("Unable to describe instances: %v", err)
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
|
|
|
@ -517,37 +517,37 @@ func TestModifierType(t *testing.T) {
|
|||
expectedModifierRule string
|
||||
}{
|
||||
{
|
||||
desc: "Request modifier annotation missing",
|
||||
desc: "Request modifier annotation missing",
|
||||
requestModifierAnnotation: "",
|
||||
expectedModifierRule: "",
|
||||
},
|
||||
{
|
||||
desc: "AddPrefix modifier annotation",
|
||||
desc: "AddPrefix modifier annotation",
|
||||
requestModifierAnnotation: " AddPrefix: /foo",
|
||||
expectedModifierRule: "AddPrefix:/foo",
|
||||
},
|
||||
{
|
||||
desc: "ReplacePath modifier annotation",
|
||||
desc: "ReplacePath modifier annotation",
|
||||
requestModifierAnnotation: " ReplacePath: /foo",
|
||||
expectedModifierRule: "ReplacePath:/foo",
|
||||
},
|
||||
{
|
||||
desc: "ReplacePathRegex modifier annotation",
|
||||
desc: "ReplacePathRegex modifier annotation",
|
||||
requestModifierAnnotation: " ReplacePathRegex: /foo /bar",
|
||||
expectedModifierRule: "ReplacePathRegex:/foo /bar",
|
||||
},
|
||||
{
|
||||
desc: "AddPrefix modifier annotation",
|
||||
desc: "AddPrefix modifier annotation",
|
||||
requestModifierAnnotation: "AddPrefix:/foo",
|
||||
expectedModifierRule: "AddPrefix:/foo",
|
||||
},
|
||||
{
|
||||
desc: "ReplacePath modifier annotation",
|
||||
desc: "ReplacePath modifier annotation",
|
||||
requestModifierAnnotation: "ReplacePath:/foo",
|
||||
expectedModifierRule: "ReplacePath:/foo",
|
||||
},
|
||||
{
|
||||
desc: "ReplacePathRegex modifier annotation",
|
||||
desc: "ReplacePathRegex modifier annotation",
|
||||
requestModifierAnnotation: "ReplacePathRegex:/foo /bar",
|
||||
expectedModifierRule: "ReplacePathRegex:/foo /bar",
|
||||
},
|
||||
|
@ -609,23 +609,23 @@ func TestModifierFails(t *testing.T) {
|
|||
requestModifierAnnotation string
|
||||
}{
|
||||
{
|
||||
desc: "Request modifier missing part of annotation",
|
||||
desc: "Request modifier missing part of annotation",
|
||||
requestModifierAnnotation: "AddPrefix: ",
|
||||
},
|
||||
{
|
||||
desc: "Request modifier full of spaces annotation",
|
||||
desc: "Request modifier full of spaces annotation",
|
||||
requestModifierAnnotation: " ",
|
||||
},
|
||||
{
|
||||
desc: "Request modifier missing both parts of annotation",
|
||||
desc: "Request modifier missing both parts of annotation",
|
||||
requestModifierAnnotation: " : ",
|
||||
},
|
||||
{
|
||||
desc: "Request modifier using unknown rule",
|
||||
desc: "Request modifier using unknown rule",
|
||||
requestModifierAnnotation: "Foo: /bar",
|
||||
},
|
||||
{
|
||||
desc: "Missing Rule",
|
||||
desc: "Missing Rule",
|
||||
requestModifierAnnotation: " : /bar",
|
||||
},
|
||||
}
|
||||
|
|
|
@ -128,7 +128,7 @@ func (p *Provider) Provide(configurationChan chan<- types.ConfigMessage, pool *s
|
|||
func detectMasters(zk string, masters []string) <-chan []string {
|
||||
changed := make(chan []string, 1)
|
||||
if zk != "" {
|
||||
log.Debugf("Starting master detector for ZK ", zk)
|
||||
log.Debugf("Starting master detector for ZK %s", zk)
|
||||
if md, err := detector.New(zk); err != nil {
|
||||
log.Errorf("Failed to create master detector: %v", err)
|
||||
} else if err := md.Detect(detect.NewMasters(masters, changed)); err != nil {
|
||||
|
|
|
@ -743,7 +743,7 @@ func TestProviderBuildConfiguration(t *testing.T) {
|
|||
|
||||
func TestProviderServiceFilter(t *testing.T) {
|
||||
provider := &Provider{
|
||||
Domain: "rancher.localhost",
|
||||
Domain: "rancher.localhost",
|
||||
EnableServiceHealthFilter: true,
|
||||
}
|
||||
|
||||
|
|
|
@ -175,7 +175,7 @@ func TestProviderBuildConfigurationV1(t *testing.T) {
|
|||
|
||||
func TestProviderServiceFilterV1(t *testing.T) {
|
||||
provider := &Provider{
|
||||
Domain: "rancher.localhost",
|
||||
Domain: "rancher.localhost",
|
||||
EnableServiceHealthFilter: true,
|
||||
}
|
||||
|
||||
|
|
|
@ -29,7 +29,7 @@ func (p *Provider) metadataProvide(configurationChan chan<- types.ConfigMessage,
|
|||
operation := func() error {
|
||||
client, err := rancher.NewClientAndWait(metadataServiceURL)
|
||||
if err != nil {
|
||||
log.Errorln("Failed to create Rancher metadata service client: %s", err)
|
||||
log.Errorf("Failed to create Rancher metadata service client: %v", err)
|
||||
return err
|
||||
}
|
||||
|
||||
|
@ -38,7 +38,7 @@ func (p *Provider) metadataProvide(configurationChan chan<- types.ConfigMessage,
|
|||
|
||||
stacks, err := client.GetStacks()
|
||||
if err != nil {
|
||||
log.Errorf("Failed to query Rancher metadata service: %s", err)
|
||||
log.Errorf("Failed to query Rancher metadata service: %v", err)
|
||||
return
|
||||
}
|
||||
|
||||
|
|
11
vendor/github.com/vulcand/oxy/buffer/buffer.go
generated
vendored
11
vendor/github.com/vulcand/oxy/buffer/buffer.go
generated
vendored
|
@ -383,7 +383,14 @@ func (b *bufferWriter) Header() http.Header {
|
|||
}
|
||||
|
||||
func (b *bufferWriter) Write(buf []byte) (int, error) {
|
||||
return b.buffer.Write(buf)
|
||||
length, err := b.buffer.Write(buf)
|
||||
if err != nil {
|
||||
// Since go1.11 (https://github.com/golang/go/commit/8f38f28222abccc505b9a1992deecfe3e2cb85de)
|
||||
// if the writer returns an error, the reverse proxy panics
|
||||
b.log.Error(err)
|
||||
length = len(buf)
|
||||
}
|
||||
return length, nil
|
||||
}
|
||||
|
||||
// WriteHeader sets rw.Code.
|
||||
|
@ -410,7 +417,7 @@ func (b *bufferWriter) Hijack() (net.Conn, *bufio.ReadWriter, error) {
|
|||
return conn, rw, err
|
||||
}
|
||||
b.log.Warningf("Upstream ResponseWriter of type %v does not implement http.Hijacker. Returning dummy channel.", reflect.TypeOf(b.responseWriter))
|
||||
return nil, nil, fmt.Errorf("The response writer that was wrapped in this proxy, does not implement http.Hijacker. It is of type: %v", reflect.TypeOf(b.responseWriter))
|
||||
return nil, nil, fmt.Errorf("the response writer wrapped in this proxy does not implement http.Hijacker. Its type is: %v”", reflect.TypeOf(b.responseWriter))
|
||||
}
|
||||
|
||||
// SizeErrHandler Size error handler
|
||||
|
|
Loading…
Reference in a new issue