This breaks people if they are depending on the contents of __address__ label. Signed-off-by: Goutham Veeramachaneni <gouthamve@gmail.com>
This commit is contained in:
parent
ab3cdb9500
commit
f988af7235
|
@ -181,6 +181,9 @@ func (d *Discovery) refresh(ctx context.Context, name string, ch chan<- []*targe
|
|||
target := model.LabelValue("")
|
||||
switch addr := record.(type) {
|
||||
case *dns.SRV:
|
||||
// Remove the final dot from rooted DNS names to make them look more usual.
|
||||
addr.Target = strings.TrimRight(addr.Target, ".")
|
||||
|
||||
target = hostPort(addr.Target, int(addr.Port))
|
||||
case *dns.A:
|
||||
target = hostPort(addr.A.String(), d.port)
|
||||
|
|
Loading…
Reference in New Issue