Skip to content
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

✨ Add specs to choose public net #235

Merged
merged 1 commit into from
Jul 1, 2022
Merged

Conversation

janiskemper
Copy link
Contributor

@janiskemper janiskemper commented Jun 29, 2022

What type of PR is this?
/kind feature New functionality.

What this PR does / why we need it:
Hetzner has released a new feature in
https://github.com/hetznercloud/hcloud-go/releases/tag/v1.35.0 that
allows choosing the primary IP address of an HCloud server on creation.
This commit introduces support for this.

Which issue(s) this PR fixes
Fixes #233

TODOs:

  • squashed commits
  • includes documentation
  • adds unit tests

@janiskemper janiskemper force-pushed the feature/select-public-net branch 5 times, most recently from e6155a6 to d740d9d Compare June 30, 2022 09:00
@janiskemper janiskemper marked this pull request as draft July 1, 2022 09:01
Hetzner has released a new feature in
https://github.com/hetznercloud/hcloud-go/releases/tag/v1.35.0 that
allows to choose the primary IP address of an HCloud server on creation.
This commit introduces support for this.
@janiskemper janiskemper marked this pull request as ready for review July 1, 2022 15:08
@janiskemper janiskemper merged commit d00cf15 into main Jul 1, 2022
@janiskemper janiskemper deleted the feature/select-public-net branch July 1, 2022 15:09
Comment on lines +582 to +583
// Only if server has IPv4, otherwise Hetzner cannot handle it
if server.PublicNet.IPv4.IP != nil {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Won't this if-statement break the use of a private IPv4 addresses in the Load Balancer as well? This seems because the hasPrivateIP-var is not taken into consideration in this if-statement.

Or, doesn't Hetzner support private IPv4 adresses without public IPv4 being attached?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @Wouter0100! This is a great catch, thank you!
We would have found this problem before the next release because we would have added some e2e tests for this setup without IPv4 addresses. But you saved us definitely some time since we don't have to search for the error anymore. Thanks!

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.

IPv6 Only/Dual Stack support?
2 participants