Propagate IG NodeLabels to k8s nodes in Hetzner
Fixes https://github.com/kubernetes/kops/issues/16159
This adds Hetzner server labels for the instance group nodeLabels. kops-controller then recognizes these server labels and sets them on the associated k8s node.
I'm marking this WIP as we may need to change this approach due to label length limits in the Hetzner API:
https://docs.hetzner.com/cloud/servers/getting-started/creating-a-server/
Both key and value must be 63 characters or less, beginning and ending with an alphanumeric character and alphanumerics can be used inbetween
The Hetzner CCM mentions support for the node.kubernetes.io/exclude-from-external-load-balancers label included in the integration test output changes: https://github.com/hetznercloud/hcloud-cloud-controller-manager/issues/182#issuecomment-830577642 which is 55 characters on its own, so with the prefix I've added it exceeds the length limit. I considered storing these elsewhere like in userdata and having kops-controller parse them out of the hcloud.Server's userdata, except hcloud doesn't expose userdata in read operations, it is a write-only field.
Therefore I think our only option is to use a shorter prefix
/wip
/cc @hakman any thoughts on how to best approach the length limit issue?
/test all
/test all
/retest
The Kubernetes project currently lacks enough contributors to adequately respond to all PRs.
This bot triages PRs according to the following rules:
- After 90d of inactivity,
lifecycle/staleis applied - After 30d of inactivity since
lifecycle/stalewas applied,lifecycle/rottenis applied - After 30d of inactivity since
lifecycle/rottenwas applied, the PR is closed
You can:
- Mark this PR as fresh with
/remove-lifecycle stale - Close this PR with
/close - Offer to help out with Issue Triage
Please send feedback to sig-contributor-experience at kubernetes/community.
/lifecycle stale
/test all
/retest
[APPROVALNOTIFIER] This PR is APPROVED
This pull-request has been approved by: hakman
The full list of commands accepted by this bot can be found here.
The pull request process is described here
- ~~OWNERS~~ [hakman]
Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment