From 3a875e29549ab5feb606b4e7c1e5c7d05d2fa696 Mon Sep 17 00:00:00 2001 From: Manuel Laufenberg Date: Mon, 6 Feb 2017 16:30:21 +0100 Subject: [PATCH] add default config lint files --- configuration.go | 6 ++++++ provider/rancher.go | 5 +++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/configuration.go b/configuration.go index 98aa636f0..7013455c7 100644 --- a/configuration.go +++ b/configuration.go @@ -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{}, } diff --git a/provider/rancher.go b/provider/rancher.go index 1c9b7ba41..77072f0a9 100644 --- a/provider/rancher.go +++ b/provider/rancher.go @@ -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]) }