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

Support bare-metal servers with hcloud-cloud-controller-manager #1470

Open
apricote opened this issue Aug 30, 2024 · 9 comments
Open

Support bare-metal servers with hcloud-cloud-controller-manager #1470

apricote opened this issue Aug 30, 2024 · 9 comments

Comments

@apricote
Copy link
Contributor

/kind feature

Describe the solution you'd like

Right now you only support Robot (bare-metal) servers when using syself/hetzner-cloud-controller-manager.

hetznercloud/hcloud-cloud-controller-manager (HCCM) added support for Robot servers in December 2023. It would be awesome if you would also support this with CAPH.

Anything else you would like to add:

As far as I could tell, the main problem is that CAPH expects the provider ID for bare-metal servers to be formatted as hcloud://bm-$ROBOTID. HCCM uses the format hrobot://$ROBOTID.

Related to hetznercloud/hcloud-cloud-controller-manager#702

Environment:

  • cluster-api-provider-hetzner version:
  • Kubernetes version: (use kubectl version)
  • OS (e.g. from /etc/os-release):
@janiskemper
Copy link
Contributor

@apricote would you be able to contribute here?

@simonostendorf
Copy link

@apricote @janiskemper did you already thought about a migration path? I think the "old" variant with bm- in the hostname and the provider id should be completely replaced with no prefix in the hostname and the hrobot:// provider prefix, but that would require a migration of existing nodes and the bm- is frequently used inside the code.

@janiskemper
Copy link
Contributor

@simonostendorf we at Syself have the wish to migrate to the "official" one at one point, but did not spend the time on developing or testing a clear migration path. I'd be happy if @apricote or someone else can contribute!

@simonostendorf
Copy link

@simonostendorf we at Syself have the wish to migrate to the "official" one at one point, but did not spend the time on developing or testing a clear migration path. I'd be happy if @apricote or someone else can contribute!

@janiskemper If you have a defined migration path I can try and add this to my todo list, but I cannot promise anything.

@janiskemper
Copy link
Contributor

@guettli has spent some time on it, but I don't think that it is a "defined migration path"

@apricote
Copy link
Contributor Author

My idea would be:

  1. Update CAPH to permit hrobot:// IDs
  2. Update syself/hetzner-cloud-controller-manager to read from both IDs
  3. In either tool add an automatic hook to rewrite the IDs from hcloud://bm- to hrobot://
  • Question would be if anyone else is using hcloud://bm- and needs to be compatible with the new prefix. Quick search on GitHub only shows HCCM & CAPH as well as some forks of both projects.

@janiskemper
Copy link
Contributor

thanks @apricote for your input!

@batistein you also had some thoughts on the difficulties!

@guettli
Copy link
Collaborator

guettli commented Jan 31, 2025

My idea would be:

  1. Update CAPH to permit hrobot:// IDs
  2. Update syself/hetzner-cloud-controller-manager to read from both IDs
  3. In either tool add an automatic hook to rewrite the IDs from hcloud://bm- to hrobot://

@apricote

Step 1 and Step 3 look good.

However, I am unsure about Step 3. What do you mean by "hook"? I would not modify existing node objects.

What do you think about these phases?

  • Phase 1: We update all places that read the ProviderID to accept both schemas. Then, we wait a few months.
  • Phase 2: We update the part that creates the old ProviderID schema so that it now generates the new hrobot:// schema.
  • Phase 3: Three years later, we remove the code that reads the old hcloud://bm- schema.

@simonostendorf
Copy link

I think Phase 1 and 2 can be performed together, so that new nodes automatically get the hrobot provider id and the old variant is only for old nodes.

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

No branches or pull requests

4 participants