Files
oc-schedulerd/conf/conf.go

35 lines
713 B
Go
Raw Normal View History

2024-07-03 10:21:17 +02:00
package conf
import (
"sync"
)
type Config struct {
2026-03-26 11:14:29 +01:00
MonitorPath string
Logs string
Mode string
KubeHost string
KubePort string
KubeCA string
KubeCert string
KubeData string
KubeNamespace string
KubeImage string
// PrepLeadSeconds is how many seconds before the scheduled start oc-monitord
// is launched so it can complete pre-pull + infra setup before the actual
// execution time. Default: 120s (2 min).
PrepLeadSeconds int
2024-07-03 10:21:17 +02:00
}
var instance *Config
var once sync.Once
const defaultConfigFile = "/etc/oc/schedulerd.json"
2024-07-03 10:21:17 +02:00
func GetConfig() *Config {
once.Do(func() {
instance = &Config{}
})
return instance
}