mirror of https://github.com/linkerd/linkerd2.git
The main change here is the refactoring of the address functions in `addr.go` that support the Destination controller and Viz's Tap controller. Some of those functions only worked for IPv4, so this change refactored them to make them IP family agnostic. This enabled adding (and fixing) IPv6 unit tests as detailed in the following sections. Other changes: - The `ProxyAddressesToString()` function was no longer used, so it got removed. - The `ProxyIPToString()` function was only used by the destination-client script, so that got stripped out. ## `addr_test.go` We added IPv6 cases to each test, that would have failed previously. ## `endpoint_translator_test.go` One of the test pods (pod3) was changed to have an IPv6. Without the other changes in this PR those tests would still have passed, but just because when comparing actual IPs with expected ones we weren't checking if they were both zero. So here we added checks against that. ## `server_test.go` As above, we added checks against empty IPs. And in the mocked resources in `test_util.go` we added an IPv6 EndpointSlice. |
||
---|---|---|
.. | ||
destination-client | ||
policy-client |