-
Notifications
You must be signed in to change notification settings - Fork 457
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
Bugfix: pvs not deleting was: Remove the assumption that a node's name == its hostname #414
Bugfix: pvs not deleting was: Remove the assumption that a node's name == its hostname #414
Conversation
As per https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#built-in-node-labels [[[ Note: The value of these labels is cloud provider specific and is not guaranteed to be reliable. For example, the value of kubernetes.io/hostname may be the same as the node name in some environments and a different value in other environments. ]]]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
I'm not a kustomize expert - I think it'd be useful to demonstrate this working both "from scratch" and also with a granfathered-in PV with the legacy hostname affinity requirement on it - could do with a hand there! (Hence the draft status) |
This could really do with #416 to close down the raciness of the e2e tests. |
This applies a small refactor to the e2e tests to ensure that the newer provisioner is capable of siting helper pods correctly to clean up PVs with "legacy" affinity constraints. The kind cluster itself is reconfigured to ensure that all nodes have `metadata.name` != `metadata.labels["kubernetes.io/hostname"]`, which is an assumption that does not hold for many cloud providers.
97b39e1
to
199ec0a
Compare
Fixed up the new e2e test (it creates a PV that should be cleaned up & waits on the provisioner; therefore we don't want deleteKustomizeDeployment to target it) |
Commenting ro remove the stale tag |
Hi @jan-g thanks for the great fix, when can we get this merged to master? @derekbit @RafalKorepta |
Hi @liangjuf I'm not maintainer, so I don't have power to merge. |
There's this PR and the one next to it that fixes up some issues with occasional e2e test failures (that means this one's tests should work reliably). This'll need rebasing atop the e2e one once that lands. Maintainers are a little thin on the ground (and derekbit is in a different tz) so I'd ask for a little patience. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
…9 ) (#5335) This PR contains the following updates: | Package | Update | Change | |---|---|---| | [local-path-provisioner](https://redirect.github.com/rancher/local-path-provisioner) | patch | `v0.0.28` -> `v0.0.29` | --- ### Release Notes <details> <summary>rancher/local-path-provisioner (local-path-provisioner)</summary> ### [`v0.0.29`](https://redirect.github.com/rancher/local-path-provisioner/releases/tag/v0.0.29): Local Path Provisioner v0.0.29 [Compare Source](https://redirect.github.com/rancher/local-path-provisioner/compare/v0.0.28...v0.0.29) #### What's Changed - Update Go to 1.22.5 by [@​unguiculus](https://redirect.github.com/unguiculus) in [https://github.com/rancher/local-path-provisioner/pull/435](https://redirect.github.com/rancher/local-path-provisioner/pull/435) - vendor: update dependencies by [@​derekbit](https://redirect.github.com/derekbit) in [https://github.com/rancher/local-path-provisioner/pull/446](https://redirect.github.com/rancher/local-path-provisioner/pull/446) - Upgrade sig storage lib external provisioner by [@​rorosen](https://redirect.github.com/rorosen) in [https://github.com/rancher/local-path-provisioner/pull/445](https://redirect.github.com/rancher/local-path-provisioner/pull/445) - chore(workflow): add "Scan With Trivy and Upload Results to GitHub Security Tab" by [@​derekbit](https://redirect.github.com/derekbit) in [https://github.com/rancher/local-path-provisioner/pull/448](https://redirect.github.com/rancher/local-path-provisioner/pull/448) - Bugfix: pvs not deleting was: Remove the assumption that a node's name == its hostname by [@​jan-g](https://redirect.github.com/jan-g) in [https://github.com/rancher/local-path-provisioner/pull/414](https://redirect.github.com/rancher/local-path-provisioner/pull/414) - Bump to v0.0.29 by [@​derekbit](https://redirect.github.com/derekbit) in [https://github.com/rancher/local-path-provisioner/pull/450](https://redirect.github.com/rancher/local-path-provisioner/pull/450) #### Contributors - [@​unguiculus](https://redirect.github.com/unguiculus) - [@​galal-hussein](https://redirect.github.com/galal-hussein) - [@​jamshidi799](https://redirect.github.com/jamshidi799) - [@​rorosen](https://redirect.github.com/rorosen) - [@​jan-g](https://redirect.github.com/jan-g) </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://redirect.github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOC42NC4yIiwidXBkYXRlZEluVmVyIjoiMzguNjQuMiIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOlsicmVub3ZhdGUvZ2l0aHViLXJlbGVhc2UiLCJ0eXBlL3BhdGNoIl19--> Co-authored-by: lumiere-bot[bot] <98047013+lumiere-bot[bot]@users.noreply.github.com>
…9 ) (#5334) This PR contains the following updates: | Package | Update | Change | |---|---|---| | [local-path-provisioner](https://redirect.github.com/rancher/local-path-provisioner) | patch | `v0.0.28` -> `v0.0.29` | --- ### Release Notes <details> <summary>rancher/local-path-provisioner (local-path-provisioner)</summary> ### [`v0.0.29`](https://redirect.github.com/rancher/local-path-provisioner/releases/tag/v0.0.29): Local Path Provisioner v0.0.29 [Compare Source](https://redirect.github.com/rancher/local-path-provisioner/compare/v0.0.28...v0.0.29) #### What's Changed - Update Go to 1.22.5 by [@​unguiculus](https://redirect.github.com/unguiculus) in [https://github.com/rancher/local-path-provisioner/pull/435](https://redirect.github.com/rancher/local-path-provisioner/pull/435) - vendor: update dependencies by [@​derekbit](https://redirect.github.com/derekbit) in [https://github.com/rancher/local-path-provisioner/pull/446](https://redirect.github.com/rancher/local-path-provisioner/pull/446) - Upgrade sig storage lib external provisioner by [@​rorosen](https://redirect.github.com/rorosen) in [https://github.com/rancher/local-path-provisioner/pull/445](https://redirect.github.com/rancher/local-path-provisioner/pull/445) - chore(workflow): add "Scan With Trivy and Upload Results to GitHub Security Tab" by [@​derekbit](https://redirect.github.com/derekbit) in [https://github.com/rancher/local-path-provisioner/pull/448](https://redirect.github.com/rancher/local-path-provisioner/pull/448) - Bugfix: pvs not deleting was: Remove the assumption that a node's name == its hostname by [@​jan-g](https://redirect.github.com/jan-g) in [https://github.com/rancher/local-path-provisioner/pull/414](https://redirect.github.com/rancher/local-path-provisioner/pull/414) - Bump to v0.0.29 by [@​derekbit](https://redirect.github.com/derekbit) in [https://github.com/rancher/local-path-provisioner/pull/450](https://redirect.github.com/rancher/local-path-provisioner/pull/450) #### Contributors - [@​unguiculus](https://redirect.github.com/unguiculus) - [@​galal-hussein](https://redirect.github.com/galal-hussein) - [@​jamshidi799](https://redirect.github.com/jamshidi799) - [@​rorosen](https://redirect.github.com/rorosen) - [@​jan-g](https://redirect.github.com/jan-g) </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://redirect.github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOC42NC4yIiwidXBkYXRlZEluVmVyIjoiMzguNjQuMiIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOlsicmVub3ZhdGUvZ2l0aHViLXJlbGVhc2UiLCJ0eXBlL3BhdGNoIl19--> Co-authored-by: lumiere-bot[bot] <98047013+lumiere-bot[bot]@users.noreply.github.com>
As per https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#built-in-node-labels
[[[
Note:
The value of these labels is cloud provider specific and is not guaranteed to be reliable. For example, the value of kubernetes.io/hostname may be the same as the node name in some environments and a different value in other environments.
]]]
(This is a quick handwave in the direction of #413)