vitobotta / hetzner-k3s

The easiest and fastest way to create and manage Kubernetes clusters in Hetzner Cloud using the lightweight distribution k3s by Rancher.
MIT License
1.72k stars 126 forks source link

Support taints/labels on autoscaled node pools #317

Open NiklasRosenstein opened 6 months ago

NiklasRosenstein commented 6 months ago

It looks like the autoscaler implementation for Hetzner cloud now supports taints/labels via HCLOUD_CLUSTER_CONFIG which replaces HCLOUD_CLOUD_INIT and HCLOUD_IMAGE!

See https://github.com/kubernetes/autoscaler/blob/master/cluster-autoscaler/cloudprovider/hetzner/README.md

Seems this was added here (https://github.com/kubernetes/autoscaler/commit/e1408eddda4a87a6bd8f0e1f379081409492536e) and is available in 1.29.0

kerkmann commented 5 months ago

Would love to see this feature, is there anything where I could help out? :heart:

vitobotta commented 4 months ago

Sorry for the delay guys. I finally have a week off work this coming week so I am planning a new release that will include this too.

vitobotta commented 4 months ago

Ref. https://github.com/users/vitobotta/projects/4/views/1?pane=issue&itemId=59922265

vitobotta commented 2 weeks ago

This is now scheduled for 2.0.1. v2.0.0 is going to be released probably next weekend, and 2.0.1 should follow not long after that.

pashtet04 commented 5 days ago

Unable to bootstrap a node pool with autoscaling that includes taints and labels

worker_node_pools:
- name: medium
  instance_type: cpx31
  instance_count: 2
  location: fsn1
- name: medium-autoscaled
  instance_type: cpx31
  instance_count: 2
  location: fsn1
  labels:
    - key: purpose
      value: ci
  taints:
    - key: ci
      value: value:NoSchedule
  autoscaling:
    enabled: true
    min_instances: 0
    max_instances: 3

hetzner-k3s --version 2.0.3

[Node labels] 
Adding labels to medium-autoscaled pool workers...
error: resource(s) were provided, but no name was specified
[Node labels] : error: resource(s) were provided, but no name was specified
vitobotta commented 5 days ago

Hi @pashtet04, this change didn't make it into a release yet. I was planning it for 2.0.1 but had to make a couple of releases to fix some more important issues. I will see if I can do it this weekend but I can't promise.