Build up Clean Schedulerd + Lib Kube
This commit is contained in:
24
conf/conf.go
24
conf/conf.go
@@ -8,14 +8,15 @@ import (
|
||||
)
|
||||
|
||||
type Config struct {
|
||||
MonitorPath string
|
||||
Logs string
|
||||
Mode string
|
||||
KubeHost string
|
||||
KubePort string
|
||||
KubeCA string
|
||||
KubeCert string
|
||||
KubeData string
|
||||
MonitorPath string
|
||||
Logs string
|
||||
KubeHost string
|
||||
KubePort string
|
||||
KubeCA string
|
||||
KubeCert string
|
||||
KubeData string
|
||||
KubeNamespace string
|
||||
KubeImage string
|
||||
}
|
||||
|
||||
var instance *Config
|
||||
@@ -40,6 +41,13 @@ func init() {
|
||||
o = onion.New(l2, l3)
|
||||
}
|
||||
GetConfig().MonitorPath = o.GetStringDefault("MONITORD_PATH", "../oc-monitord/oc-monitord")
|
||||
GetConfig().KubeHost = o.GetStringDefault("KUBE_HOST", "")
|
||||
GetConfig().KubePort = o.GetStringDefault("KUBE_PORT", "6443")
|
||||
GetConfig().KubeCA = o.GetStringDefault("KUBE_CA", "")
|
||||
GetConfig().KubeCert = o.GetStringDefault("KUBE_CERT", "")
|
||||
GetConfig().KubeData = o.GetStringDefault("KUBE_DATA", "")
|
||||
GetConfig().KubeNamespace = o.GetStringDefault("KUBE_NAMESPACE", "default")
|
||||
GetConfig().KubeImage = o.GetStringDefault("KUBE_IMAGE", "oc-monitord")
|
||||
}
|
||||
|
||||
func GetConfig() *Config {
|
||||
|
||||
Reference in New Issue
Block a user