f-25: config: add metadata dir
Signed-off-by: GnomeZworc <nicolas.boufidjeline@g3e.fr>
This commit is contained in:
parent
e545b70d53
commit
4bef0f9d5f
2 changed files with 8 additions and 0 deletions
|
|
@ -35,6 +35,10 @@ interfaces:
|
|||
internet: br-000000
|
||||
admin: br-000000
|
||||
|
||||
# Metadata server runtime directory (cloud-init files per VM)
|
||||
metadata:
|
||||
run_dir: "/run/two/metadata"
|
||||
|
||||
# Logging configuration
|
||||
logger:
|
||||
# Log level: debug, info, warn, error (default: info)
|
||||
|
|
|
|||
|
|
@ -28,6 +28,9 @@ type Config struct {
|
|||
Level string `mapstructure:"level"`
|
||||
Debug bool `mapstructure:"debug"`
|
||||
} `mapstructure:"logger"`
|
||||
Metadata struct {
|
||||
RunDir string `mapstructure:"run_dir"`
|
||||
} `mapstructure:"metadata"`
|
||||
DefaultInterface string `mapstructure:"default_interface"`
|
||||
Interfaces map[string]string `mapstructure:"interfaces"`
|
||||
}
|
||||
|
|
@ -46,6 +49,7 @@ func LoadConfig(path string) (*Config, error) {
|
|||
v.SetDefault("worker.buffer_size", 100)
|
||||
v.SetDefault("dispatcher.timeout_seconds", 300)
|
||||
v.SetDefault("dispatcher.poll_seconds", 2)
|
||||
v.SetDefault("metadata.run_dir", "/run/two/metadata")
|
||||
v.SetDefault("default_interface", "br-000000")
|
||||
v.SetDefault("logger.level", "info")
|
||||
v.SetDefault("logger.debug", false)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue