✨ allow multiple subnets if first matches the configured one on HetznerCluster #1633
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.
What this PR does / why we need it:
We are currently running a setup where we have a k8s cluster running on Hetnzer cloud with a public IP and a private network. We also have bare metal nodes (setup manually and not running k8s) which we are connecting via a private network (vSwitch) to the k8s nodes. The setup works in general, but the controller reports errors due to multiple subnets restriction.
The idea of the PR is that we could allow multiple subnets in a network as long as the first subnet matches with the one that is configured on the
HetznerCluster
resource. When attaching a server to the network it will use the first subnet by default.Wdyt about that solution? I have seen in multiple issues that you don't use private networks in your product and I think therefore this would be an acceptable solution to connect bare metal nodes <-> cloud nodes without making major modifications to the project's code.
Which issue(s) this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close the issue(s) when PR gets merged):Special notes for your reviewer:
TODOs: