Skip to content

Conversation

@fgrutsch
Copy link

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:

  • squash commits
  • include documentation
  • add unit tests

@fcuello-fudo
Copy link

I just tried this PR and it's working fine for us. Thanks.

@suyash-811
Copy link

Hi @fgrutsch,
Thanks for the PR. i tried this on my end and could only party make it work, and hence wanted to ask you some details about it.

Some context about how i used the PR:
I created two cloud subnets, and one vswitch subnets. The controller did identify correctly that the first subnet was indeed the configured subnet. However, the servers that were created were attached to the second cloud subnet (which is not the intended behavior I'm going for)

When i however only have one cloud subnet, and one vswitch subnet it works out perfectly. How is your use-case? Do you also have only one cloud and one vswitch subnet?

Thanks in advance 😄

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.

3 participants