Skip to content

Conversation

@lukasmetzner
Copy link
Contributor

@lukasmetzner lukasmetzner commented Dec 17, 2025

This will enable the watch based route reconciliation by default. We already mentioned this feature gate in v1.27.0

@codecov
Copy link

codecov bot commented Dec 17, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 68.61%. Comparing base (a724c8e) to head (dc3b4ed).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1112      +/-   ##
==========================================
+ Coverage   68.53%   68.61%   +0.07%     
==========================================
  Files          23       23              
  Lines        2619     2619              
==========================================
+ Hits         1795     1797       +2     
  Misses        651      651              
+ Partials      173      171       -2     
Flag Coverage Δ
e2e 44.90% <ø> (-0.53%) ⬇️
unit 64.75% <ø> (ø)

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 changed the title deps: update k8s.io/* deps to v1.35-rc.1 deps: update k8s.io/* deps to v1.35 Dec 18, 2025
@lukasmetzner lukasmetzner changed the title deps: update k8s.io/* deps to v1.35 feat: enable watch based route reconciliation by default Dec 18, 2025
@lukasmetzner lukasmetzner marked this pull request as ready for review December 18, 2025 10:05
@lukasmetzner lukasmetzner requested a review from a team as a code owner December 18, 2025 10:05
}
}

func TestRouteDeleteCorrectRoutes(t *testing.T) {
Copy link
Member

Choose a reason for hiding this comment

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

Why are we removing this?

Copy link
Contributor Author

@lukasmetzner lukasmetzner Dec 18, 2025

Choose a reason for hiding this comment

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

The test can't work this way, as we no longer reconcile in a fixed interval. Normally these cleanups would either be directly happening in case of a node delete event, or if a stale route exists, it would be removed within 12 - 24 hours.

We might need to build a different testing setup to add or delete nodes from the cluster to test this behavior. Adding nodes is already covered by the cluster creation and the TestRouteNetworksPodIPsAreAccessible.

Copy link
Member

@jooola jooola Dec 18, 2025

Choose a reason for hiding this comment

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

Ok, if the rest of the tests are covering this in some way, I am ok with removing this, but it feels weird to have to remove tests while enabling that feature by default in the same time.

Are we trying to rush things here?

Copy link
Contributor Author

@lukasmetzner lukasmetzner Dec 18, 2025

Choose a reason for hiding this comment

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

Good point, maybe we can wait with this and not rush it now.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I will take a look again later and decide.

Copy link
Member

Choose a reason for hiding this comment

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

One idea for this test:

  1. Manually create Routes for a made up server
  2. Create Node object for made up node, with provider id and pod cidr set
  3. HCCM will reconcile the node and delete it
  4. All the events to nodes will trigger a reconcile of the routes.

Copy link
Member

@jooola jooola left a comment

Choose a reason for hiding this comment

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

I don't know enough to fully approve those changes, but the code change looks good.

@lukasmetzner lukasmetzner merged commit 8dce78b into main Dec 18, 2025
15 of 18 checks passed
@lukasmetzner lukasmetzner deleted the deps-k8s-v1.35 branch December 18, 2025 15:24
lukasmetzner pushed a commit that referenced this pull request Dec 18, 2025
 ### Watch-Based Route Reconciliation

Previously, route reconciliation is performed at a fixed interval of
30s. This leads to unnecessary API requests, as a `GET
/v1/networks/{id}` call is triggered every 30s, even when no changes
have occurred.

Upstream, we have contributed an event-driven approach, similar to the
mechanisms used by other controllers such as the Load Balancer
controller. With this new approach, route reconciliation is triggered by
node additions, node deletions, or changes to a node’s `PodCIDRs` or
`Addresses`. Additionally, to ensure consistency, reconciliation still
occurs periodically at a randomized interval between 12 and 24 hours.

#### Enabled by default

This feature is now **enabled by default**.

If you encounter any problems you can disable the feature by setting the
following Helm value:


`args.feature-gates=CloudControllerManagerWatchBasedRoutesReconciliation=false`

### Global Load Balancer Defaults

Configure cluster-wide defaults for Load Balancers via the extended
`HCLOUD_LOAD_BALANCERS_*` env vars. These values automatically apply
during Load Balancer creation and reconciliation whenever annotations
are omitted. Learn more about it in the [reference
documentation](docs/reference/load_balancer_envs.md)

### Features

- extend environment variables for default load balancer configuration
(#1052)
- enable watch based route reconciliation by default (#1112)
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.

4 participants