Don't show "Service name will not be discoverable..." warning when DNS is disabled
- Dominant language
- Go
- Stars
- 30.1k
- Forks
- 4.6k
- Avg merge
- 1d 18h
- Merged PRs (30d)
- 39
Description
In our Consul setup (v.1.11.3), we have a lot of services with names that include underscores (like `sth-with_underscore`). Also, we do not use DNS at all, which means we set DNS port to -1 via the `--dns-port -1` command line parameter.
However, a lot of DNS warnings are printed into Consul logs concerning the names that are not valid for the DNS discovery:
`[WARN] agent: Service name will not be discoverable via DNS due to invalid characters. Valid characters include all alpha-numerics and dashes.: service=sth-with_underscore`
#### Feature Description
I suggest not to show the invalid name warning if the DNS is disabled (the DNS port is set to -1).
#### Use Case(s)
The feature will be helpful for users who don't use DNS in their Consul setups.
Contributor guide
Assessment
This issue has not been assessed yet.