Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ipv6 support #26

Merged
merged 12 commits into from
Sep 1, 2023
Merged

Add ipv6 support #26

merged 12 commits into from
Sep 1, 2023

Conversation

wildum
Copy link
Contributor

@wildum wildum commented Aug 28, 2023

The implementation is inspired from the one in dskit with a few twists to match our case.

Given a list of interfaces the code will return the best IP it can find.
Best is defined in the following order:

  • IPv4 valid and not link-local unicast
  • IPv6 valid and not link-local unicast
  • IPv4 valid and link-local unicast
  • IPv6 valid and link-local unicast

Instead of sending a list of interfaces, the user can send "all" and the code will retrieve all available interfaces and find the best IP amongst these.

@CLAassistant
Copy link

CLAassistant commented Aug 28, 2023

CLA assistant check
All committers have signed the CLA.

Copy link
Member

@tpaschalis tpaschalis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is already looking good, some nits.

advertise/addr.go Outdated Show resolved Hide resolved
advertise/addr.go Outdated Show resolved Hide resolved
advertise/addr.go Outdated Show resolved Hide resolved
advertise/addr.go Outdated Show resolved Hide resolved
go.mod Outdated Show resolved Hide resolved
Copy link
Member

@tpaschalis tpaschalis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, will merge this later today to let @rfratto take a look.

(Let's just run go mod tidy to get rid of extra noise)

Copy link
Member

@rfratto rfratto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM following feedback

advertise/addr.go Outdated Show resolved Hide resolved
advertise/addr.go Outdated Show resolved Hide resolved
node.go Outdated Show resolved Hide resolved
Copy link
Member

@rfratto rfratto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@rfratto rfratto merged commit 1947b14 into grafana:main Sep 1, 2023
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants