Skip to content

🌱 Fix "phasing-out-datacenters"#79

Merged
guettli merged 5 commits intomainfrom
tg/fix-hcloud-api-change--phasing-out-datacenters
Feb 19, 2026
Merged

🌱 Fix "phasing-out-datacenters"#79
guettli merged 5 commits intomainfrom
tg/fix-hcloud-api-change--phasing-out-datacenters

Conversation

@guettli
Copy link
Copy Markdown

@guettli guettli commented Feb 19, 2026

From upstream ccm:

The server.datacenter field is deprecated and will be removed from the API response after July 2026: https://docs.hetzner.cloud/changelog#2025-12-16-phasing-out-datacenters

To avoid a breaking change in HCCM, we decided to statically map from the old location names to the existing datacenter names for the topology.kubernetes.io/zone label. For new locations we will return the location name without a -dcxx suffix.

Deployments of hcloud-cloud-controller-manager that are not updated when the field is removed from the API will panic with the following error:

"Observed a panic" panic="runtime error: invalid memory address or nil pointer dereference" 
   panicGoValue="\"invalid memory address or nil pointer dereference\""

Related hcloud-ccm PR: hetznercloud#1159

From upstream ccm:

The server.datacenter field is deprecated and will be removed from the API response after July 2026: https://docs.hetzner.cloud/changelog#2025-12-16-phasing-out-datacenters

To avoid a breaking change in HCCM, we decided to statically map from the old location names to the existing datacenter names for the topology.kubernetes.io/zone label. For new locations we will return the location name without a -dcxx suffix.

Deployments of hcloud-cloud-controller-manager that are not updated when the field is removed from the API will panic with the following error:

```
"Observed a panic" panic="runtime error: invalid memory address or nil pointer dereference" panicGoValue="\"invalid memory address or nil pointer dereference\""
```
@guettli guettli requested a review from janiskemper February 19, 2026 12:59
Comment thread internal/legacydatacenter/datacenter.go Outdated
return "hil-dc1"
case "sin":
return "sin-dc1"
case "Test Location":
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can remove that right?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@janiskemper done.

@guettli guettli requested a review from janiskemper February 19, 2026 13:28
@guettli guettli merged commit 20b44ec into main Feb 19, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants