-
Notifications
You must be signed in to change notification settings - Fork 190
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
Implement multiple public IP resolvers #1344
Conversation
🤖 Created branch: z_pr1344/mangelajo/public-ip-methods |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor grammar issue; more importantly, since this means we no longer need go-ipify
, please run go mod tidy
to remove it from go.mod
(and go.sum
).
005b43a
to
0364f74
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the review, I handled the comments and extended the tests.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This still needs go mod tidy
;-).
@skitt oops, right! |
0364f74
to
7a8ee67
Compare
7a8ee67
to
75a300f
Compare
acdd491
to
0c47009
Compare
pkg/endpoint/public_ip_test.go
Outdated
Expect(net.ParseIP(ip)).NotTo(BeNil()) | ||
}) | ||
}) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure we should test these specific sites - we may get intermittent failures. The main thing is to test the algorithm. We could start a local HTTP server for the test (on localhost:<some port>
) and use that URL. If we want to verify these specific sites for validity as defaults then we can add a periodic test. But I don't think we should gate unrelated PRs if these sites get flaky.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we really should. Probably unit test is not the best place to test it.
But we definitely should test them periodically to make sure that the defaults we offer to customers are functional and healthy.
I can remove those tests if we agree to enable some periodic check for those resolvers in CI
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree we need to test the remote resolvers, not to do their monitoring for them, but just to know that they are functional as you say. However their failure should never create difficulty in evaluating or merging a PR. So a periodic test is fine for this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your feedback, I agree it will be better to periodically monitor. I will create a separate PR for that, some github action + bash should suffice.
b6f2935
to
ab04b9e
Compare
ab04b9e
to
f24a761
Compare
The gateway nodes now can be labeled as: gateway.submariner.io/public-ip=<resolver>[,resolver..] where resolvers take the form of <method>:<parameter> the implemented methods are: - api - lb - ipv4 - dns this commit also adds additional fallback API public-ip resolvers In addition to https://api.ipify.org - https://api.my-ip.io/ip - https://ip4.seeip.org Signed-off-by: Miguel Angel Ajo <[email protected]>
f24a761
to
387e917
Compare
last push to update the license headers, and squashed into a single commit for easier backport. |
@skitt sorry about that, while handling the markdown details I updated the patch according to the new public IP resolvers too, |
@skitt I'm an idiot, the comment and review re-request was really for: https://github.com/submariner-io/submariner-website/pull/485/files#diff-a9163e1cec4d91ef9323f3e06e5ad35552e68c096b78f5e5635607580c48e5a1R20 If you can, please re-add your vote, no changes here. |
🤖 Closed branches: [z_pr1344/mangelajo/public-ip-methods] |
Thank you @tpantelis & @skitt |
The gateway nodes now can be labeled as:
where resolvers take the form of
<method>:<parameter>
the implemented methods are:
Fixes-Issue: #1317
Related-Issue: #1310
Related-Issue: #1071
Adds multiple API fallbacks:
Signed-off-by: Miguel Angel Ajo [email protected]