Files
oc-schedulerd/conf/conf.go
2026-03-26 11:14:29 +01:00

35 lines
713 B
Go

package conf
import (
"sync"
)
type Config struct {
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
}
var instance *Config
var once sync.Once
const defaultConfigFile = "/etc/oc/schedulerd.json"
func GetConfig() *Config {
once.Do(func() {
instance = &Config{}
})
return instance
}