f-86: hostsvc: relais DNS et NTP par hôte, socket de contrôle #86
Signed-off-by: GnomeZworc <nicolas.boufidjeline@g3e.fr>
This commit is contained in:
parent
ae7213a9d1
commit
d4b83bdb17
20 changed files with 2235 additions and 0 deletions
|
|
@ -54,6 +54,7 @@ type Config struct {
|
|||
} `mapstructure:"watchdog"`
|
||||
Network Network `mapstructure:"network"`
|
||||
BGP BGP `mapstructure:"bgp"`
|
||||
HostSvc HostSvc `mapstructure:"hostsvc"`
|
||||
DefaultInterface string `mapstructure:"default_interface"`
|
||||
Interfaces map[string]string `mapstructure:"interfaces"`
|
||||
}
|
||||
|
|
@ -79,6 +80,9 @@ func LoadConfig(path string) (*Config, error) {
|
|||
v.SetDefault("times.poll_interval", PollInterval)
|
||||
v.SetDefault("metadata.run_dir", "/run/two/metadata")
|
||||
v.SetDefault("dhcp.backend", BackendTwo)
|
||||
v.SetDefault("hostsvc.dns_upstream", []string{})
|
||||
v.SetDefault("hostsvc.ntp_upstream", []string{})
|
||||
v.SetDefault("hostsvc.rate_limit_per_vpc", RateLimitPerVPC)
|
||||
v.SetDefault("qemu.ovmf_code_path", "/usr/share/OVMF/OVMF_CODE.fd")
|
||||
v.SetDefault("qemu.ovmf_vars_template", "/usr/share/OVMF/OVMF_VARS.fd")
|
||||
v.SetDefault("qemu.uefi_vars_dir", "/run/two/vms/uefi")
|
||||
|
|
@ -111,6 +115,9 @@ func LoadConfig(path string) (*Config, error) {
|
|||
if err := cfg.Times.Validate(); err != nil {
|
||||
return nil, fmt.Errorf("%s: %w", path, err)
|
||||
}
|
||||
if err := cfg.HostSvc.Validate(); err != nil {
|
||||
return nil, fmt.Errorf("%s: %w", path, err)
|
||||
}
|
||||
|
||||
return &cfg, nil
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue