add default config

lint files
This commit is contained in:
Manuel Laufenberg 2017-02-06 16:30:21 +01:00
parent bdb63ac785
commit 3a875e2954
2 changed files with 9 additions and 2 deletions

View file

@ -401,6 +401,11 @@ func NewTraefikDefaultPointersConfiguration() *TraefikConfiguration {
defaultECS.Cluster = "default"
defaultECS.Constraints = types.Constraints{}
//default Rancher
var defaultRancher provider.Rancher
defaultRancher.Watch = true
defaultRancher.ExposedByDefault = true
defaultConfiguration := GlobalConfiguration{
Docker: &defaultDocker,
File: &defaultFile,
@ -414,6 +419,7 @@ func NewTraefikDefaultPointersConfiguration() *TraefikConfiguration {
Kubernetes: &defaultKubernetes,
Mesos: &defaultMesos,
ECS: &defaultECS,
Rancher: &defaultRancher,
Retry: &Retry{},
}

View file

@ -19,6 +19,7 @@ import (
)
const (
// RancherDefaultWatchTime is the duration of the interval when polling rancher
RancherDefaultWatchTime = 15 * time.Second
)
@ -279,7 +280,7 @@ func listRancherEnvironments(client *rancher.RancherClient) []*rancher.Environme
log.Errorf("Cannot get Rancher Environments %+v", err)
}
for k, _ := range environments.Data {
for k := range environments.Data {
environmentList = append(environmentList, &environments.Data[k])
}
@ -296,7 +297,7 @@ func listRancherServices(client *rancher.RancherClient) []*rancher.Service {
log.Errorf("Cannot get Rancher Services %+v", err)
}
for k, _ := range services.Data {
for k := range services.Data {
servicesList = append(servicesList, &services.Data[k])
}