discovery/config: add swarmsd config validation.

Signed-off-by: johncming <johncming@yahoo.com>
pull/7615/head
johncming 4 years ago committed by Julien Pivotto
parent d17d20ac27
commit 6da680c7e4

@ -83,6 +83,11 @@ func (c *ServiceDiscoveryConfig) Validate() error {
return errors.New("empty or null section in digitalocean_sd_configs")
}
}
for _, cfg := range c.DockerSwarmSDConfigs {
if cfg == nil {
return errors.New("empty or null section in dockerswarm_sd_configs")
}
}
for _, cfg := range c.DNSSDConfigs {
if cfg == nil {
return errors.New("empty or null section in dns_sd_configs")

Loading…
Cancel
Save