Skip to content

[hetzner] cluster-autoscaler addon missing HCLOUD_TOKEN environment variable #18133

@bjornharrtell

Description

@bjornharrtell

Summary

The cluster-autoscaler addon template does not inject the HCLOUD_TOKEN environment variable into the autoscaler pod when running on Hetzner. As a result, the autoscaler fails immediately on startup because it cannot authenticate with the Hetzner API.

Root cause

upup/models/cloudup/resources/addons/cluster-autoscaler.addons.k8s.io/k8s-1.15.yaml.template only has an env: block for AWS (AWS_REGION). There is no corresponding block for Hetzner.

The hcloud secret (containing token and network keys) is already created in kube-system by the CCM addon, so the credentials are available — they just aren't passed to the autoscaler container.

Impact

The kops-managed cluster-autoscaler addon is completely non-functional on Hetzner. Users must deploy the autoscaler manually with the correct environment variables.

Originally reported in #17543.

Fix

Add an else if (eq GetCloudProvider "hetzner") env block that sources HCLOUD_TOKEN and HCLOUD_NETWORK from the existing hcloud secret. Fix included in the PR that accompanies this issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions