filter terraform output routerIP for v4 addresses only #936
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
How to categorize this PR?
/area networking
/kind bug
/platform openstack
What this PR does / why we need it:
As described in the issue, openstack routers expose a list of external IPs, and those could be v6 even if the rest of the networking stack is v4 only. This will filter terraform output
routerIP
for v4 addresses only and return only one of them just in case there could still be multiple, since the rest of the code currently expects a single v4 IPWhich issue(s) this PR fixes:
Fixes #897
Special notes for your reviewer:
I purposefully avoided changing the API and properly handling and forwarding lists of IPs for now. I expect there is a proper v6/dualstack PR coming anyway that will need to handle this cleanly. This minimal change unblocks us for further gardener upgrades, so I wanted to share it. I can see why you would not want to merge it in favor of a proper solution. I'm happy to give this PR a little bit more love with feedback, but I don't want to waste anybodies time if this is not the right direction long-term, which I could totally understand.
Release note: