From b75115b0678a1034ffc1d1c8fee40c7f5b995c97 Mon Sep 17 00:00:00 2001 From: Kiran Kamineni Date: Wed, 17 Jul 2019 16:55:00 -0700 Subject: Add custom label to track created resources Create a custom label on created resources Also, create it on pods where pods are being created. This will help us later for filtering and querying pods and resources. Issue-ID: MULTICLOUD-675 Change-Id: I4b4fce7b67f9f27559d99dcca94a9191b96cb7c6 Signed-off-by: Kiran Kamineni --- src/k8splugin/internal/config/config.go | 54 +++++++++++++++++---------------- 1 file changed, 28 insertions(+), 26 deletions(-) (limited to 'src/k8splugin/internal/config/config.go') diff --git a/src/k8splugin/internal/config/config.go b/src/k8splugin/internal/config/config.go index ac653282..23ec401e 100644 --- a/src/k8splugin/internal/config/config.go +++ b/src/k8splugin/internal/config/config.go @@ -26,19 +26,20 @@ import ( // Configuration loads up all the values that are used to configure // backend implementations type Configuration struct { - CAFile string `json:"ca-file"` - ServerCert string `json:"server-cert"` - ServerKey string `json:"server-key"` - Password string `json:"password"` - DatabaseAddress string `json:"database-address"` - DatabaseType string `json:"database-type"` - PluginDir string `json:"plugin-dir"` - EtcdIP string `json:"etcd-ip"` - EtcdCert string `json:"etcd-cert"` - EtcdKey string `json:"etcd-key"` - EtcdCAFile string `json:"etcd-ca-file"` - OVNCentralAddress string `json:"ovn-central-address"` - ServicePort string `json:"service-port"` + CAFile string `json:"ca-file"` + ServerCert string `json:"server-cert"` + ServerKey string `json:"server-key"` + Password string `json:"password"` + DatabaseAddress string `json:"database-address"` + DatabaseType string `json:"database-type"` + PluginDir string `json:"plugin-dir"` + EtcdIP string `json:"etcd-ip"` + EtcdCert string `json:"etcd-cert"` + EtcdKey string `json:"etcd-key"` + EtcdCAFile string `json:"etcd-ca-file"` + OVNCentralAddress string `json:"ovn-central-address"` + ServicePort string `json:"service-port"` + KubernetesLabelName string `json:"kubernetes-label-name"` } // Config is the structure that stores the configuration @@ -74,19 +75,20 @@ func defaultConfiguration() *Configuration { } return &Configuration{ - CAFile: "ca.cert", - ServerCert: "server.cert", - ServerKey: "server.key", - Password: "", - DatabaseAddress: "127.0.0.1", - DatabaseType: "mongo", - PluginDir: cwd, - EtcdIP: "127.0.0.1", - EtcdCert: "etcd.cert", - EtcdKey: "etcd.key", - EtcdCAFile: "etcd-ca.cert", - OVNCentralAddress: "127.0.0.1:6641", - ServicePort: "9015", + CAFile: "ca.cert", + ServerCert: "server.cert", + ServerKey: "server.key", + Password: "", + DatabaseAddress: "127.0.0.1", + DatabaseType: "mongo", + PluginDir: cwd, + EtcdIP: "127.0.0.1", + EtcdCert: "etcd.cert", + EtcdKey: "etcd.key", + EtcdCAFile: "etcd-ca.cert", + OVNCentralAddress: "127.0.0.1:6641", + ServicePort: "9015", + KubernetesLabelName: "k8splugin.io/rb-instance-id", } } -- cgit 1.2.3-korg