Browse Source

Merge pull request #7615 from johncming/swarmsd_config

discovery/config: add swarmsd config validation.
pull/7608/head
Björn Rabenstein 4 years ago committed by GitHub
parent
commit
e0c0f996b3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 5
      discovery/config/config.go

5
discovery/config/config.go

@ -83,6 +83,11 @@ func (c *ServiceDiscoveryConfig) Validate() error {
return errors.New("empty or null section in digitalocean_sd_configs") 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 { for _, cfg := range c.DNSSDConfigs {
if cfg == nil { if cfg == nil {
return errors.New("empty or null section in dns_sd_configs") return errors.New("empty or null section in dns_sd_configs")

Loading…
Cancel
Save