Comments (9)
Hi @pucilpet!
Quick answer to the hostSelcetor: You don't have to set it at all! You can use labels on your host and let a bm machine select a certain host by its labels. If not, then just any host is chosen. You see in the reference that the hostSelector is optional. You don't have to worry about it at all ;)
Regarding the cluster template: Each host object has to be created in a highly specific way. We have described in the reference what fields have to be specified. We cannot create a cluster-template for this, as this wouldn't work out of the box. Everybody would have to adapt it. If you have another suggestion where we should have an example, then tell us! Here is a template, (which you have to adapt, of course):
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
kind: HetznerBareMetalHost
metadata:
name: "bm-0"
spec:
serverID: 1682566
rootDeviceHints:
wwn: "eui.0068475201b4egh2"
maintenanceMode: false
description: Test Machine 0
from cluster-api-provider-hetzner.
Let me think about how to improve it and I will work on a PR.
from cluster-api-provider-hetzner.
Hi @pucilpet! Quick answer to the hostSelcetor: You don't have to set it at all! You can use labels on your host and let a bm machine select a certain host by its labels. If not, then just any host is chosen. You see in the reference that the hostSelector is optional. You don't have to worry about it at all ;) Regarding the cluster template: Each host object has to be created in a specific way.
Thanks for your answer @janiskemper
That is exactly what I am trying to avoid - having a bare metal server selected that is already being used for something else. :) But having read your answer and the docs again, I can see that I had been thinking the relationship between the HetznerBareMetalHost, the HetznerBareMetalTemplate and the bare metal servers purchased on Hetzner - all wrong. So it's my bad.
I understand your point regarding the cluster template. But it might be better to have some skeleton template than nothing at all. :)
Thanks again!
from cluster-api-provider-hetzner.
Also - from what I can see from /docs/reference/hetzner-bare-metal-machine-template.md - the template.spec.hostSelector is actually marked as required. :)
from cluster-api-provider-hetzner.
I think we can maybe put an example into the docs.
I am happy that you understood the relationship between the objects now. Do you have any suggestion on how we can improve the documentation so that it is easier to understand?
And yes, you are absolutely right. hostSelector is marked as required, but it is not. As can be seen in the cluster templates, where we don't use it.
Do you want to make a contribution to the docs? Then you could also update the hostSelector required field. We definitely welcome new contributors ;) If you have no suggestion on how to improve the docs, then I'll update the required=true field.
Anyway, thanks for finding the mistake in the docs!
from cluster-api-provider-hetzner.
Thank you so much @pucilpet! I'm looking forward to it!
from cluster-api-provider-hetzner.
One more thing that I noticed, probably might be a good idea to open a new issue?
In /docs/topics/preparation.md it is stated that
Preparing Hetzner Robot
Generate an SSH key. You can either upload it via Hetzner Robot UI, or you can just rely on the controller to upload a key that it does not find in the robot API. This is possible, as you have to store the public and private key together with the ssh key's name in a secret that the controller reads.
But when I added the ssh key only to a secret and not via Hetzner Robot UI, the hetznerbaremetalhosts stay in "preparing" state, never actually rebooting the servers.
Only after I added the SSH key via Hetzner Robot UI and named it "cluster" I was able to provision the baremetalhosts.
Is this something you have seen, too? Should I include in the docs PR that uploading the SSH key to Hetzner robot UI is required with the name cluster or maybe there needs to be some code change?
from cluster-api-provider-hetzner.
@pucilpet in theory it should work to upload ssh keys to robot API that are not yet registered, see
.Can you maybe have a look at the logs whether there are error messages related to this?
from cluster-api-provider-hetzner.
If this does not work there should be error logs. And yes, if you find some it would be good to open a new issue for this, as it has nothing to do anymore with the original topic of this issue here. Thank you!
from cluster-api-provider-hetzner.
Related Issues (20)
- Controller should not pick hbmh with one disk, if swraid=true
- Better structure of CapH docs HOT 5
- Understanding CapH docs from a high level perspective
- Improve Hetzner guide HOT 1
- Handle robot_unavailable errors when creating load balancers or adding targets to a load balancer
- git based management with flux not possible HOT 5
- Test CAPH with changing API token
- switch to python3
- Remove server from load balancer after node is drained
- Add control planes as targets to load balancer only when they are reachable
- Test new logic of addition/removal of servers in the load balancer
- Custom resource definitions for CAPH HOT 3
- Customize LoadBalancer Name HOT 3
- :bug: bare-metal server get re-provisioning on expected drive new caph release. Can lead to data loss! HOT 1
- Add webhooks for ProviderMachineTemplate objects
- Validate HBMH before using it
- Update information of Hetzner secret in workload / target cluster
- Choose HetznerBareMetalHosts with RootDeviceHints set over those ones without
- Condition for missing `rootDeviceHints` of `HetznerBareMetalHost`
- Update the quickstart guide
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cluster-api-provider-hetzner.