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 setting worker replica count to 0 #72

Merged
merged 1 commit into from
Dec 12, 2023

Conversation

accorvin
Copy link
Contributor

@accorvin accorvin commented Dec 4, 2023

Some OpenShift cluster topologies (single node openshift, schedulable master nodes) require creating a cluster with zero worker nodes. We want to be able to deploy clusters with this configuration to more optimally use our cloud resource quotas. This change is necessary to allow OSIA to provision a cluster with zero workers. Prior to this change, if you set the count to zero with the CLI --worker-replicas flag, Jinja would interpret zero as False and therefore use the default value of 3. This moves the logic for setting the default value to the base cloud class. I moved the master node replica count logic to the same place for consistency.

Some OpenShift cluster topologies (single node openshift, schedulable
master nodes) require creating a cluster with zero worker nodes. We want to be able
to deploy clusters with this configuration to more optimally use our
cloud resource quotas. This change is necessary to allow OSIA to
provision a cluster with zero workers. Prior to this change, if you set the count
to zero with the CLI `--worker-replicas` flag, Jinja would interpret
zero as False and therefore use the default value of 3. This moves the
logic for setting the default value to the base cloud class. I moved the master
node replica count logic to the same place for consistency.
@accorvin
Copy link
Contributor Author

accorvin commented Dec 4, 2023

@mijaros let me know what you think of this change when you have a chance.

@mijaros
Copy link
Contributor

mijaros commented Dec 12, 2023

Looking into it, and it makes sense, for me the base issue is to use the default once it is not set. This does exactly that. Thank you for the contribution.

@mijaros mijaros self-requested a review December 12, 2023 11:10
Copy link
Contributor

@mijaros mijaros left a comment

Choose a reason for hiding this comment

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

The change makes sense and allows new ability to the tool. 👍

@mijaros mijaros merged commit 2780df0 into redhat-cop:devel Dec 12, 2023
4 checks passed
@accorvin accorvin deleted the configure-replica-count branch December 15, 2023 17:06
@accorvin
Copy link
Contributor Author

Thanks @mijaros! Do you know when you plan to cut a new release that will include this change?

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.

2 participants