Update docker api version

This commit is contained in:
Daniel Tomcej
2019-06-03 03:28:07 -06:00
committed by Traefiker Bot
parent 9da0bcf3aa
commit 8e992c7cfb
3 changed files with 5 additions and 18 deletions

View File

@@ -28,7 +28,9 @@ import (
)
const (
// SwarmAPIVersion is a constant holding the version of the Provider API traefik will use
// DockerAPIVersion is a constant holding the version of the Provider API traefik will use
DockerAPIVersion = "1.24"
// SwarmAPIVersion is a constant holding the version of the Provider API traefik will use.
SwarmAPIVersion = "1.24"
)
@@ -110,11 +112,10 @@ func (p *Provider) createClient() (client.APIClient, error) {
"User-Agent": "Traefik " + version.Version,
}
var apiVersion string
apiVersion := DockerAPIVersion
if p.SwarmMode {
apiVersion = SwarmAPIVersion
} else {
apiVersion = DockerAPIVersion
}
return client.NewClient(p.Endpoint, apiVersion, httpClient, httpHeaders)

View File

@@ -1,8 +0,0 @@
// +build !windows
package docker
const (
// DockerAPIVersion is a constant holding the version of the Provider API traefik will use
DockerAPIVersion = "1.21"
)

View File

@@ -1,6 +0,0 @@
package docker
const (
// DockerAPIVersion is a constant holding the version of the Provider API traefik will use
DockerAPIVersion string = "1.24"
)