kube-hetzner / terraform-hcloud-kube-hetzner

Optimized and Maintenance-free Kubernetes on Hetzner Cloud in one command!
MIT License
2.42k stars 371 forks source link

[Bug]: Network routes are not cleaned up by HCCM #1477

Closed apricote closed 2 months ago

apricote commented 2 months ago

Description

Network Routes are not properly cleaned up by hcloud-cloud-controller-manager since HCCM v1.20.0.

This causes issues when users cycle through their nodes (with autoscaler) and they have a lot of stale routes laying around. Adding new nodes then fails because they have already reached the routes limit (100).

HCCM only cleans up routes that are inside its configured --cluster-cidr.

In HCCM v1.20.0 we changed our pod spec from using command to args. Your patches (templates/ccm.yaml.tpl) still try to override the command, and are then ignored because the ccm-networks.yaml has the default --cluster-cidr in the args.

This was originally reported in https://github.com/hetznercloud/hcloud-cloud-controller-manager/issues/734

Kube.tf file

The issue can be reproduced with the default `kube.tf`.

Screenshots

No response

Platform

Linux

mysticaltech commented 2 months ago

Thanks @apricote. Next time please tag me directly for quick processing. Will merge the PR today.