-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Allow 0 replicas #958
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 0 replicas #958
Conversation
|
Wouldn't it be better to get rid of the validation that requires the worker machine pool? |
staebler
left a comment
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.
Improve the commit message. See https://github.com/openshift/installer/blob/master/CONTRIBUTING.md#commit-message-format.
pkg/types/validation/machinepools.go
Outdated
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.
I'm not sure why this is necessary of all a sudden. It worked fine in v0.6.0. Does not work in v0.7.0-master or master.
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.
Validation was added in v0.7.0.
c102986 to
15b8dd4
Compare
|
This will make it valid to set a replica size of 0 for the master machine pool as well. I don't think we want that. |
@staebler I can make it check just masters if you prefer. |
@michaelgugino My preference is to remove the requirement for the "worker" machine pool. Is there a reason to keep that machine pool with a replica size of 0 instead of omitting that machine pool? |
Aside from the fact that there are other validations in place expect that to be present? No, I don't think we need it to be present at all, but that would be a bigger patch set. Keeping it also would result in the machineset being created, which might be desired for scaling later in other usecases, of which I don't have a compelling example ATM. While we could exclude workers, I think it makes more sense to specifically include masters. I think in all likelihood there will be an expectation to have arbitrary machinesets in the future, but it makes no difference to me. Let me know what you prefer, I think the simplest fix is the best here, I just need it to not fail when I want to create ignition configs with 0 workers. |
We can do either, especially for the short term. I think changing the validation to remove the "worker" requirement is easy, too. Delete these 3 lines. installer/pkg/types/validation/installconfig.go Lines 103 to 105 in ac006ae
|
|
@michaelgugino Whichever you prefer to do in the short term, I will lgtm to get BYO unblocked on this. |
8666e74 to
eb55931
Compare
This commit is needed to allow 0 replicas for workers which is necessary for the BYO usecase.
eb55931 to
36bc20a
Compare
|
@staebler ptal |
|
@michaelgugino: The following test failed, say
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
|
/cc @wking @abhinavdahiya lgtm |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: michaelgugino, sdodson If they are not already assigned, you can assign the PR to them by writing The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
@michaelgugino I ran into this recently as well. I think I'd prefer @staebler's suggestion of removing the need for the worker machine pool. Do you have time to take another pass at this? If not, I'll eventually pick it up. |
@crawford I think that would still require this patch set. While the workers could indeed not be defined, if they are defined and set to zero, we'd still hit the same error. IMO, allowing for zero makes more sense as it's easier to template. |
We don't currently support configuring zero workers [1], largely because some key operators still do not tolerate masters. Still, some users are attempting to work around our checks by leaving 'replicas' unset (which ends up as nil in Go) [2]. This commit adjusts our install-config defaulting to fill in the default replica counts when the user provides machine-pool entries but leaves replicas unset. [1]: openshift#958 [2]: https://bugzilla.redhat.com/show_bug.cgi?id=1670005#c1
|
On the operator-support front, I've filed Bugzilla issues for the three remaining pods which do not tolerate masters: |
|
Superseded by #1231. |
|
@crawford: Closed this PR. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
This is needed for BYO team to have 0 worker replicas.