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

feat: backwards compatible labelling per node per nodepool. #1185

Merged
merged 11 commits into from
Feb 27, 2024

Conversation

valkenburg-prevue-ch
Copy link
Contributor

And now you can remove / replace individual nodes in a nodepool, instead of having to set the count all the way to zero to make sure that the one sick node is removed.

This is an example implementation of the discussion #1038 .

variables.tf Outdated Show resolved Hide resolved
@mysticaltech
Copy link
Collaborator

@valkenburg-prevue-ch Looks great! I will review ASAP. It's something that might help us too with the placement group issue we had. See comment by @mnencia here on his findings: #1161 (comment). And the original issue here #1157. If you can address this too, I would be super greatful!

@valkenburg-prevue-ch
Copy link
Contributor Author

@valkenburg-prevue-ch Looks great! I will review ASAP. It's something that might help us too with the placement group issue we had. See comment by @mnencia here on his findings: #1161 (comment). And the original issue here #1157. If you can address this too, I would be super greatful!

Thanks! I'll make some small modifications after @maggie44 already went through everything and proposed some improvements.

@valkenburg-prevue-ch
Copy link
Contributor Author

valkenburg-prevue-ch commented Feb 14, 2024

@maggie44 @mnencia @aleksasiriski IMHO this PR is ready for review, I addressed the discussions (please check them, although I marked them as resolved).

@valkenburg-prevue-ch
Copy link
Contributor Author

Oh by the way, added a section in the readme for migrating from count-based to map-based node pools, it's super simple in the end.

@mnencia
Copy link
Contributor

mnencia commented Feb 14, 2024

Thank you. I'll review the PR ASAP.

@valkenburg-prevue-ch
Copy link
Contributor Author

Thank you. I'll review the PR ASAP.

Actually, now that I read the placement group issue, I realize that this PR is broken when someone uses node keys > 10 or simply more than 10 nodes, as the placement group logic doesn't account for this sparse use of indices. I think I'll make a separate PR which fixes the placement group bug, but I'm struggling to find an implementation which is backwards compatible.

@mysticaltech
Copy link
Collaborator

mysticaltech commented Feb 17, 2024

@valkenburg-prevue-ch Good job with #1217 fixing the placement group logic. So this current PR is ready too? 🙏

@valkenburg-prevue-ch
Copy link
Contributor Author

@valkenburg-prevue-ch Good job with #1217 fixing the placement group logic. So this current PR is ready too? 🙏

Yes! I think both are ready. But if course to be tested live in a staging environment, I guess.

mysticaltech
mysticaltech previously approved these changes Feb 20, 2024
Copy link
Collaborator

@mysticaltech mysticaltech left a comment

Choose a reason for hiding this comment

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

That's some serious level of customization! Wow.

@mysticaltech
Copy link
Collaborator

mysticaltech commented Feb 20, 2024

@kube-hetzner/core Please review if you can, super important PR. I think it adds loads of possibility to the agent nodes setup without making the code overly complex. @maggie44 You also please, you are one of the main stakeholders here ;)

I intend to merge and release tonight if no opposition comes up by then.

Copy link
Contributor

@maggie44 maggie44 left a comment

Choose a reason for hiding this comment

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

This is such a great change! Opens up a whole new realm of control, can't wait to get it on to all the clusters.

Thanks @mysticaltech for the ping.

README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
agents.tf Outdated Show resolved Hide resolved
variables.tf Outdated Show resolved Hide resolved
locals.tf Outdated Show resolved Hide resolved
variables.tf Show resolved Hide resolved
variables.tf Outdated Show resolved Hide resolved
variables.tf Outdated Show resolved Hide resolved
@mysticaltech
Copy link
Collaborator

@valkenburg-prevue-ch In light of the new review(s), will await your signal to merge this 🙏

@aleksasiriski @mnencia FYI

@valkenburg-prevue-ch
Copy link
Contributor Author

Rebased on master, with some added code for making the placement-group logic work well with the individual node configuration. Adopted comments from @maggie44 . New review, anyone?

@mysticaltech
Copy link
Collaborator

mysticaltech commented Feb 23, 2024

Rebased on master, with some added code for making the placement-group logic work well with the individual node configuration. Adopted comments from @maggie44 . New review, anyone?

Awesome, will review ASAP 🙏

@kube-hetzner/core FYI, that's an important change, your input is always valued!

Copy link
Collaborator

@mysticaltech mysticaltech left a comment

Choose a reason for hiding this comment

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

If this is well tested for backward compatibility, and I guess that it is, looks great! Super powerful multi-layered logic there 🫡

@mnencia If you can find the time to review this it would be great.

@mysticaltech mysticaltech requested a review from a team February 24, 2024 09:40
@mysticaltech mysticaltech requested a review from a team February 24, 2024 09:43
@mysticaltech
Copy link
Collaborator

@kube-hetzner/core This is merging soon, if you want to review it's now or never!

@mysticaltech mysticaltech merged commit 130ed2b into master Feb 27, 2024
3 checks passed
@mysticaltech mysticaltech deleted the feat/individual-nodes-in-nodepools branch February 27, 2024 20:38
@mysticaltech
Copy link
Collaborator

@valkenburg-prevue-ch @maggie44 Shipped in v2.13.0, thanks for the wonderful work people!

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