Skip to content

fix: use ipv4 port#93

Open
rohankmr414 wants to merge 1 commit into
teralytics:masterfrom
rohankmr414:master
Open

fix: use ipv4 port#93
rohankmr414 wants to merge 1 commit into
teralytics:masterfrom
rohankmr414:master

Conversation

@rohankmr414
Copy link
Copy Markdown

@rohankmr414 rohankmr414 commented Sep 21, 2023

By default it writes the ipv6 port and ipv4 address to the service discovery output file, with this patch the ipv4 port will be written

Comment thread main.go
if len(i.NetworkBindings) > 0 {
for _, nb := range i.NetworkBindings {
if int(*nb.ContainerPort) == exporterPort {
if int(*nb.ContainerPort) == exporterPort && *nb.BindIP == "0.0.0.0" {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This excludes all other bind IPs that aren't 0.0.0.0 but are IPv4.

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.

2 participants