fix: statically map deprecated datacenter names#1159
Merged
lukasmetzner merged 2 commits intomainfrom Feb 18, 2026
Merged
Conversation
Datacenters will be deprecated after July 2026 and no longer returned in the API. To avoid a breaking change in the API we decided to statically map from the old location names to the existing datacenter names in the `topology.kuberenetes.io/zone` label.
07a0854 to
e1d37af
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1159 +/- ##
==========================================
+ Coverage 68.36% 68.55% +0.19%
==========================================
Files 23 24 +1
Lines 2627 2643 +16
==========================================
+ Hits 1796 1812 +16
Misses 656 656
Partials 175 175
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Contributor
Author
|
This PR addresses the immediate fix for #1146 |
apricote
approved these changes
Feb 18, 2026
This was referenced Feb 19, 2026
lukasmetzner
pushed a commit
that referenced
this pull request
Feb 20, 2026
### Datacenter Deprecation 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\"" We have published an RFC which details how we want to continue utilizing the labels `topology.kubernetes.io/zone` and `topology.kubernetes.io/region`: #1146 (comment) ### Bug Fixes - statically map deprecated datacenter names (#1159)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The
server.datacenterfield is deprecated and will be removed from the API response after July 2026: https://docs.hetzner.cloud/changelog#2025-12-16-phasing-out-datacentersTo 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/zonelabel. For new locations we will return the location name without a-dcxxsuffix.Deployments of
hcloud-cloud-controller-managerthat are not updated when the field is removed from the API will panic with the following error: