add config parameter for powerdns integration

This commit is contained in:
Adora Laura Kalb 2023-03-14 10:37:31 +01:00
parent 928b08d0ce
commit 0fa1474f6c

View file

@ -62,8 +62,10 @@ func initConfig() {
viper.SetConfigName("ipam") viper.SetConfigName("ipam")
viper.SetConfigType("yaml") viper.SetConfigType("yaml")
viper.SetDefault("DataPath", ipamdir+"data/")
viper.SetDefault("EnablePowerDNS", false) viper.SetDefault("EnablePowerDNS", false)
viper.SetDefault("DataPath", ipamdir+"/data/") viper.SetDefault("PowerDNSEndpoint", "")
viper.SetDefault("PowerDNSApiKey", "")
if err := viper.ReadInConfig(); err != nil { if err := viper.ReadInConfig(); err != nil {
_, patherr := os.Stat(ipamdir) _, patherr := os.Stat(ipamdir)