diff --git a/backends/configmap/config.go b/backends/configmap/config.go deleted file mode 100644 index e9b3b0fa..00000000 --- a/backends/configmap/config.go +++ /dev/null @@ -1,47 +0,0 @@ -/* - * This file is part of remco. - * © 2016 The Remco Authors - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -package configmap - -import ( - "github.com/HeavyHorst/easyKV/kubernetesConfigMap" - "github.com/HeavyHorst/remco/backends" - "github.com/HeavyHorst/remco/log" - "github.com/HeavyHorst/remco/template" - "github.com/Sirupsen/logrus" -) - -// Config represents the config for the configmap backend. -type Config struct { - KubeConfig string - Name string - Namespace string - template.Backend -} - -// Connect creates a new kubernetesClient and fills the underlying template.Backend with the configmap-Backend specific data. -func (c *Config) Connect() (template.Backend, error) { - if c == nil { - return template.Backend{}, backends.ErrNilConfig - } - - log.WithFields(logrus.Fields{ - "backend": "configMap", - }).Info("Set backend") - - client, err := kubernetesConfigMap.New(c.Namespace, c.Name, kubernetesConfigMap.WithConfig(c.KubeConfig)) - - if err != nil { - return c.Backend, err - } - - c.Backend.ReadWatcher = client - c.Backend.Name = "configMap" - - return c.Backend, nil -} diff --git a/config.go b/config.go index 2c4b87b0..c689bb38 100644 --- a/config.go +++ b/config.go @@ -15,7 +15,6 @@ import ( "sync" "github.com/HeavyHorst/remco/backends" - "github.com/HeavyHorst/remco/backends/configmap" "github.com/HeavyHorst/remco/backends/consul" "github.com/HeavyHorst/remco/backends/env" "github.com/HeavyHorst/remco/backends/etcd" @@ -34,13 +33,12 @@ type tomlConf struct { Resource []struct { Template []*template.ProcessConfig Backend struct { - Etcd *etcd.Config - File *file.Config - Env *env.Config - Consul *consul.Config - Vault *vault.Config - Redis *redis.Config - Configmap *configmap.Config + Etcd *etcd.Config + File *file.Config + Env *env.Config + Consul *consul.Config + Vault *vault.Config + Redis *redis.Config } } } @@ -89,13 +87,12 @@ func (c *tomlConf) run(stop chan bool) { for _, v := range c.Resource { var backendList []template.Backend backendConfigMap := map[string]template.BackendConfig{ - "etcd": v.Backend.Etcd, - "file": v.Backend.File, - "env": v.Backend.Env, - "consul": v.Backend.Consul, - "vault": v.Backend.Vault, - "redis": v.Backend.Redis, - "configmap": v.Backend.Configmap, + "etcd": v.Backend.Etcd, + "file": v.Backend.File, + "env": v.Backend.Env, + "consul": v.Backend.Consul, + "vault": v.Backend.Vault, + "redis": v.Backend.Redis, } for name, config := range backendConfigMap {