Documentation
¶
Overview ¶
Package hcloudccminstaller provides installation of the Hetzner Cloud Controller Manager.
The cloud controller manager enables LoadBalancer services on Hetzner Cloud clusters by automatically provisioning and managing Hetzner Load Balancers.
Prerequisites:
- HCLOUD_TOKEN environment variable must be set with a valid Hetzner Cloud API token
- The token requires read/write permissions for Load Balancers
The installer creates a Kubernetes secret with the API token and deploys the cloud controller manager via its Helm chart. The secret is shared with the Hetzner CSI driver if both components are installed.
Index ¶
Constants ¶
const DefaultClusterCIDR = "10.244.0.0/16"
DefaultClusterCIDR is the default pod CIDR for Kubernetes clusters. This matches the Talos/Kubernetes default and is required by Cilium in ipam.mode=kubernetes for node pod CIDR allocation.
Variables ¶
var ErrHetznerTokenNotSet = hetzner.ErrTokenNotSet
ErrHetznerTokenNotSet is returned when the HCLOUD_TOKEN environment variable is not set.
Functions ¶
func ResolveHetznerNetworkName ¶ added in v7.4.2
ResolveHetznerNetworkName determines the Hetzner Cloud private network name for the CCM from the cluster configuration.
Resolution order:
- If spec.provider.hetzner.networkName is explicitly set, use that. This matches the API contract: "If empty, a network named '<cluster-name>-network' will be created."
- Otherwise, extract the cluster name from the kubeconfig context (e.g., "admin@dev" → "dev") and append the standard network suffix ("-network") to match what hetzner.Provider.EnsureNetwork creates.
Returns empty string if the network name cannot be determined.
Types ¶
type Installer ¶
Installer installs or upgrades the Hetzner Cloud Controller Manager.
It delegates to hetzner.Installer which handles the shared Hetzner lifecycle: creating the HCLOUD_TOKEN secret and installing the Helm chart.
The cloud controller manager enables LoadBalancer services on Hetzner Cloud by provisioning Hetzner Load Balancers and managing their lifecycle. It also initializes nodes by matching Kubernetes nodes to Hetzner Cloud servers using private network IPs (requires HCLOUD_NETWORK to be set).
Prerequisites:
- HCLOUD_TOKEN environment variable must be set with a valid Hetzner Cloud API token
- The token requires read/write access to Load Balancers
func NewInstaller ¶
func NewInstaller( client helm.Interface, kubeconfig, context string, timeout time.Duration, networkName string, ) *Installer
NewInstaller creates a new Hetzner Cloud Controller Manager installer instance. The networkName parameter specifies the Hetzner Cloud private network name that CCM uses to look up servers by their private IPs. If empty, networking support is not enabled in the CCM chart values.