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

Allow machine pools to be created and scaled down to 0 #1232

Merged
merged 1 commit into from Oct 27, 2023

Conversation

klippo
Copy link
Contributor

@klippo klippo commented Sep 24, 2023

Issue: #1231

Problem

It's not possible to set a machine_pool quantity to 0, this blocks temporarily scaling down a pool, and instead it will be deleted. It's possible to both create and scale down clusters from the UI with a value of 0, so the provider should allow the same.

Solution

Remove the ValidateFunc: validation.IntAtLeast(1),

Testing

N/A

Engineering Testing

Manual Testing

Verified functionality by deploying to a RKE2 clusters in OpenStack with machine_pool quantity set to 0.

Automated Testing

N/A

QA Testing Considerations

N/A

Regressions Considerations

I've manually tested this change on OpenStack and it seems to work as expected. But I'm not sure if it will work with other providers.

This was first discussed in #107, and while it's not possible to create a cluster with only empty pools, it's still possible create empty pools as long as there's at least one pool with quantity >= 1.

@klippo klippo marked this pull request as ready for review September 24, 2023 13:08
@a-blender a-blender requested review from a team and a-blender October 26, 2023 18:44
Copy link
Contributor

@a-blender a-blender left a comment

Choose a reason for hiding this comment

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

Lgtm, thank you!

Copy link
Contributor

@mjura mjura left a comment

Choose a reason for hiding this comment

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

LGTM

@a-blender a-blender merged commit 6134283 into rancher:master Oct 27, 2023
1 check passed
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.

None yet

3 participants