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

Bugfix: pvs not deleting was: Remove the assumption that a node's name == its hostname #414

Merged
merged 2 commits into from
Aug 31, 2024

Conversation

jan-g
Copy link
Contributor

@jan-g jan-g commented Jun 7, 2024

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)

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.
]]]
Copy link

@RafalKorepta RafalKorepta left a comment

Choose a reason for hiding this comment

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

LGTM

@jan-g
Copy link
Contributor Author

jan-g commented Jun 7, 2024

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)

@jan-g
Copy link
Contributor Author

jan-g commented Jun 10, 2024

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.
@jan-g jan-g force-pushed the change-node-affinity-annotation branch from 97b39e1 to 199ec0a Compare June 14, 2024 08:46
@jan-g
Copy link
Contributor Author

jan-g commented Jun 14, 2024

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)

@jan-g
Copy link
Contributor Author

jan-g commented Jul 28, 2024

Commenting ro remove the stale tag

@liangjuf
Copy link

liangjuf commented Aug 1, 2024

Hi @jan-g thanks for the great fix, when can we get this merged to master? @derekbit @RafalKorepta

@RafalKorepta
Copy link

Hi @liangjuf I'm not maintainer, so I don't have power to merge.

@jan-g
Copy link
Contributor Author

jan-g commented Aug 1, 2024

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.

@jan-g jan-g changed the title Remove the assumption that a node's name == its hostname Bugfix: pvs not deleting was: Remove the assumption that a node's name == its hostname Aug 11, 2024
Copy link
Member

@derekbit derekbit left a comment

Choose a reason for hiding this comment

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

LGTM

@derekbit derekbit merged commit 59a15da into rancher:master Aug 31, 2024
lumiere-bot bot referenced this pull request in coolguy1771/home-ops Sep 3, 2024
…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
[@&#8203;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
[@&#8203;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
[@&#8203;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
[@&#8203;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 [@&#8203;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
[@&#8203;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

-   [@&#8203;unguiculus](https://redirect.github.com/unguiculus)
-   [@&#8203;galal-hussein](https://redirect.github.com/galal-hussein)
-   [@&#8203;jamshidi799](https://redirect.github.com/jamshidi799)
-   [@&#8203;rorosen](https://redirect.github.com/rorosen)
-   [@&#8203;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>
lumiere-bot bot referenced this pull request in coolguy1771/home-ops Sep 3, 2024
…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
[@&#8203;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
[@&#8203;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
[@&#8203;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
[@&#8203;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 [@&#8203;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
[@&#8203;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

-   [@&#8203;unguiculus](https://redirect.github.com/unguiculus)
-   [@&#8203;galal-hussein](https://redirect.github.com/galal-hussein)
-   [@&#8203;jamshidi799](https://redirect.github.com/jamshidi799)
-   [@&#8203;rorosen](https://redirect.github.com/rorosen)
-   [@&#8203;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>
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