hashicorp / hashicorp/consul

Don't show "Service name will not be discoverable..." warning when DNS is disabled

Open
#12,588 2 comments 2 reactions 1 assignee Claimed by @Amier3 View on GitHub
theme/operator-usability type/enhancement
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.