mirror of
https://github.com/prometheus/prometheus.git
synced 2025-03-05 20:59:13 -08:00
fix(scaleway-sd): do not fill public_ipv4 with ipv6
Signed-off-by: Jules Casteran <jcasteran@scaleway.com>
This commit is contained in:
parent
9eac82de40
commit
a307cd4633
|
@ -209,8 +209,10 @@ func (d *instanceDiscovery) refresh(ctx context.Context) ([]*targetgroup.Group,
|
|||
}
|
||||
|
||||
if server.PublicIP != nil { //nolint:staticcheck
|
||||
labels[instancePublicIPv4Label] = model.LabelValue(server.PublicIP.Address.String()) //nolint:staticcheck
|
||||
addr = server.PublicIP.Address.String() //nolint:staticcheck
|
||||
if server.PublicIP.Family != instance.ServerIPIPFamilyInet6 { //nolint:staticcheck
|
||||
labels[instancePublicIPv4Label] = model.LabelValue(server.PublicIP.Address.String()) //nolint:staticcheck
|
||||
}
|
||||
addr = server.PublicIP.Address.String() //nolint:staticcheck
|
||||
}
|
||||
|
||||
if server.PrivateIP != nil {
|
||||
|
|
Loading…
Reference in a new issue