Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(routes): Only delete routes in the Cluster CIDR #432

Merged
merged 3 commits into from
Apr 28, 2023

Conversation

apricote
Copy link
Member

This is a two-part fix for #425.

Closes #425

More details can be found in this comment

Part 1: fix(routes): correctly handle delete for routes without server

We previously required that the route we were about to delete had a valid server. This does not make sense because in most cases we delete the route precisely because the server was deleted.

Part 2: fix(routes): let k/cloud-provider decide which routes to delete

We implemented a route cleanup in #238 that deletes all routes in the network that can not be mapped to the private IP of a node. This causes issues for users who create their own routes, e.g. to an alias IP.

We do not need to implement this ourselves, becausekubernetes/cloud-provider already implemented all the checks for us, with more consideration about which routes actually need to be deleted.

In particular, the ccm should only delete routes that are within the configured --cluster-cidr range.

We previously required that the route we were about to delete had a valid server. This does not make sense because in most cases we delete the route precisely because the server was deleted.

Related to #425
We implemented a route cleanup in #238 that deletes all routes in the
network that can not be mapped to the private IP of a node. This causes
issues for users who create their own routes, e.g. to an alias IP.

We do not need to implement this ourselves, because
`kubernetes/cloud-provider` already implemented all the checks for us,
with more consideration about which routes actually need to be deleted.

In particular, the ccm should only delete routes that are within the
configured Cluster CIDR range.
@apricote apricote added the bug Something isn't working label Apr 27, 2023
@apricote apricote requested a review from a team as a code owner April 27, 2023 15:16
@apricote apricote self-assigned this Apr 27, 2023
@apricote apricote merged commit c35d292 into main Apr 28, 2023
@apricote apricote deleted the delete-correct-routes branch April 28, 2023 07:18
apricote pushed a commit that referenced this pull request Jun 16, 2023
🤖 I have created a release *beep* *boop*
---


##
[1.16.0](v1.15.0-rc.0...v1.16.0)
(2023-06-16)


### Features

* **helm:** allow to manually set network name or ID
([#458](#458))
([8410277](8410277))


### Bug Fixes

* **ci:** qemu binfmt wrappers during release
([#421](#421))
([84a7541](84a7541))
* **routes:** Only delete routes in the Cluster CIDR
([#432](#432))
([c35d292](c35d292))


### Continuous Integration

* setup release-please
([#437](#437))
([bbec89e](bbec89e))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: Hetzner Cloud Bot <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Working routes to alias IPs are being deleted by the HCCM
2 participants