use machine auth secret from common config

This commit is contained in:
Willy Kloucek
2022-04-27 14:40:53 +02:00
parent b3f55765d8
commit f74d1e27c1
8 changed files with 21 additions and 8 deletions
@@ -95,7 +95,7 @@ func EnsureDefaults(cfg *config.Config) {
if cfg.Metadata.MachineAuthAPIKey == "" && cfg.Commons != nil && cfg.Commons.MachineAuthAPIKey != "" {
cfg.MachineAuthAPIKey = cfg.Commons.MachineAuthAPIKey
} else {
} else if cfg.MachineAuthAPIKey == "" {
log.Fatalf("machine auth api key is not set up properly, bailing out (%s)", cfg.Service.Name)
}
}