36 lines
1002 B
Go
36 lines
1002 B
Go
package conf
|
|
|
|
import "sync"
|
|
|
|
type Config struct {
|
|
Mode string
|
|
KubeHost string
|
|
KubePort string
|
|
// KubeExternalHost is the externally reachable address of this cluster's API server.
|
|
// Used when generating kubeconfigs for remote peers. Must be an IP or hostname
|
|
// reachable from outside the cluster (NOT kubernetes.default.svc.cluster.local).
|
|
KubeExternalHost string
|
|
KubeCA string
|
|
KubeCert string
|
|
KubeData string
|
|
MinioRootKey string
|
|
MinioRootSecret string
|
|
MonitorMode string
|
|
MonitorAddress string
|
|
// SourceKeyStorePath est le chemin du fichier JSON persistant qui stocke
|
|
// la table privée opaque_key → { real_path, resource_id }.
|
|
// Ce fichier doit être sur un volume monté pour survivre aux redémarrages.
|
|
// Valeur par défaut : /data/source-keys.json
|
|
SourceKeyStorePath string
|
|
}
|
|
|
|
var instance *Config
|
|
var once sync.Once
|
|
|
|
func GetConfig() *Config {
|
|
once.Do(func() {
|
|
instance = &Config{}
|
|
})
|
|
return instance
|
|
}
|