-
Notifications
You must be signed in to change notification settings - Fork 130
Description
TL;DR
First of all, I'm fully aware that Robot server can't be set as a gateway in private network routing table, thus native routing mode is not possible with K8s bare-metal Robot nodes behind vSwitch. Actually HCCM started with HCLOUD_NETWORK_ROUTES_ENABLED and ROBOT_ENABLED refuses to work:
F0223 17:35:28.064115 1 main.go:67] Cloud provider could not be initialized: using Routes with Robot is not supported
Fair enough.
However, I'm experimenting with the following setup
- control plane and workers in
hcloud, Cilium innativerouting mode - additional bare metal nodes
- WireGuard overlay providing PodCIDR routes between hcloud- and bare-metal machines
So far it works fine - pods can communicate for all hcloud/robot host combinations. For now I configured WG mesh statically with Ansible, yet it should be fairly trivial to write a small daemon running on each of the nodes, that watches K8s Nodes and updates WG config accordingly. I'd still like HCCM to configure routes for hcloud nodes, however.
And here HCCM becomes somewhat problematic:
- with both Robot and routes support it refuses to work for a good reason, as stated above
- with Robot and no Routes it will obviously not configure hcloud routes for me.
- with only Routes controller (and Robot support disabled) it fails due to CCM trying to query node metadata and add routes to my bare metal nodes (note: it was running previously with Robot enabled, that's why it knows the ProviderID):
E0223 17:37:05.688826 1 route_controller.go:452] Could not create route d6b653d1-1514-447e-ab17-f3879ba980b2 10.244.21.0/24 for node elwro: hcloud/CreateRoute: hcops/AllServersCache.ByName: elwro hcops/AllServersCache.getCache: not found
...
E0223 17:37:05.716171 1 node_controller.go:285] Error getting instance metadata for node addresses: hcloud/instancesv2.InstanceMetadata: no robot client configured, make sure to enable Robot support in the configuration
Now - what can be done to support such an idea? AFAIK, CCM has no support for any kind of node filtering using labels, etc. (I've seen some open issues asking for such features: kubernetes/kubernetes#88820 , kubernetes/kubernetes#73171 ).
It might make sense to disable HCCM route controller altogether and do it on my own - given that I want to configure WG mesh routing, using hcloud API to setup cloud-side routing seems consistent.
Any other ideas? Something I overlooked?
Expected behavior
Id' like HCCM to support Robot in nodes controller when routes controller is enabled for hcloud nodes.