Skip to content

fix: routes controller on node name drift#1221

Draft
lukasmetzner wants to merge 3 commits intomainfrom
fix/routes-controller-node-name-drift
Draft

fix: routes controller on node name drift#1221
lukasmetzner wants to merge 3 commits intomainfrom
fix/routes-controller-node-name-drift

Conversation

@lukasmetzner
Copy link
Copy Markdown
Contributor

If a Kubernetes node got successfully initialized we have the Server ID stored in the node objets providerID. When renaming a Server, causing a drift between the node and Server name, we should still be able to identify the Server via its ID. This is currently not implemented in the routes' controller, where we rely purly on the Servers name.

As the upstream library only provides us with the Kubernetes node name and not the full object, we have to first fetch it from the Kubernetes API. With the node object at hand we can identify and fetch the Server by its ID. Furthermore, we can use the Kubernetes node object to improve our handling of Kubernetes events. The event emitted on a CIDR mismatch is currently not associated with the affected node, because so far we did not have access to the nodes UUID.

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 23, 2026

Codecov Report

❌ Patch coverage is 70.83333% with 28 lines in your changes missing coverage. Please review.
✅ Project coverage is 70.35%. Comparing base (6ec988b) to head (ea742f6).

Files with missing lines Patch % Lines
hcloud/routes.go 64.55% 19 Missing and 9 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1221      +/-   ##
==========================================
+ Coverage   69.58%   70.35%   +0.76%     
==========================================
  Files          24       24              
  Lines        2657     2675      +18     
==========================================
+ Hits         1849     1882      +33     
+ Misses        634      616      -18     
- Partials      174      177       +3     
Flag Coverage Δ
e2e 44.68% <41.66%> (+0.46%) ⬆️
unit 66.69% <66.66%> (+0.67%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@lukasmetzner lukasmetzner force-pushed the fix/routes-controller-node-name-drift branch from 0e99446 to 19d6cf7 Compare April 23, 2026 13:18
If a Kubernetes node got successfully initialized we have the Server
ID stored in the node objets `providerID`. When renaming a Server,
causing a drift between the node and Server name, we should still
be able to identify the Server via its ID. This is currently not
implemented in the routes' controller, where we rely purly on the
Servers name.

As the upstream library only provides us with the Kubernetes node name
and not the full object, we have to first fetch it from the Kubernetes
API. With the node object at hand we can identify and fetch the Server
by its ID. Furthermore, we can use the Kubernetes node object to improve
our handling of Kubernetes events. The event emitted on a CIDR mismatch
is currently not associated with the affected node, because so far we
did not have access to the nodes UUID.
@lukasmetzner lukasmetzner force-pushed the fix/routes-controller-node-name-drift branch from 19d6cf7 to 1382b4c Compare April 27, 2026 12:01
@lukasmetzner lukasmetzner force-pushed the fix/routes-controller-node-name-drift branch from 08a2e3f to ea742f6 Compare April 27, 2026 12:48
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.

1 participant