Make master nodes schedulable#366
Conversation
| // if we have 3 running master nodes in the cluster, setting this value to 33% means, 1 | ||
| // node of 3 available master nodes would become schedulable. The absolute value is calculated | ||
| // by rounding down. This field is optional | ||
| PercentageOfMastersSchedulable intstr.IntOrString `json:"percentageOfMastersSchedulable"` |
There was a problem hiding this comment.
I think you need
+optional
at the end of the doc text (just like the above DefaultNodeSelector).
And also make it *intstr.IntOrString so we can distinguish unset or empty.
There was a problem hiding this comment.
The naming seems awkward; how about just MaxMastersSchedulable or so, a bit like RollingUpdateDeployment's MaxUnavailable?
There was a problem hiding this comment.
I think you need
+optional
at the end of the doc text (just like the above DefaultNodeSelector).
I think it's not needed as long as we provide some text. I have seen both the variants but not sure which one is preferred
The naming seems awkward; how about just MaxMastersSchedulable or so, a bit like RollingUpdateDeployment's MaxUnavailable?
Yeah, I agree. I got to know about it while I was implementing, where it's possible to have both integer values and strings. Will change that in a bit along with comments.
There was a problem hiding this comment.
intOrString for explicitly specified percentages is strange. Why not just making it a float?
And add minimum and maximum as OpenAPI specification.
There was a problem hiding this comment.
We can add number of nodes as well, for example a user can explicitly tell 3 instead of 40%. This is the pattern we've been following in other apps.
0612176 to
4a117e2
Compare
| // node of 3 available master nodes would become schedulable. The absolute value is calculated | ||
| // by rounding down. This field is optional | ||
| // +optional | ||
| MaxMastersSchedulable *intstr.IntOrString `json:"percentageOfMastersSchedulable"` |
There was a problem hiding this comment.
I think this should be a bool. I don't see a reason to make this a percentage.
There was a problem hiding this comment.
The reason is in future, say if we have 5 masters cluster. We can tell, I want only 2 to be schedulable, so that even if they're loaded and they go down, we can still maintain quorum(with 3 masters). The other use-case is developers telling, I want 2 nodes to be made worker nodes and let one run as master..
There was a problem hiding this comment.
@soltysh had a concern about making this a
bool, specifically having to change this interface later if we ever wanted to to allow the user to specify a subset of masters that should be scheduleable.@deads2k thoughts on that?
If that becomes a thing we want (and I think that's pretty unlikely), we can add another field that takes precedence over this one.
| // +optional | ||
| DefaultNodeSelector string `json:"defaultNodeSelector,omitempty"` | ||
| // percentageOfMastersSchedulable allows a certain percentage of available master nodes to | ||
| // be schedulable. As of now, the supported values are 0 and 100. In future, we |
| // will allow a certain percentage of master nodes to be schedulable. For example, | ||
| // if we have 3 running master nodes in the cluster, setting this value to 33% means, 1 | ||
| // node of 3 available master nodes would become schedulable. The absolute value is calculated | ||
| // by rounding down. This field is optional |
There was a problem hiding this comment.
rounding down means that 33% becomes zero master.
7d3f3d7 to
c7db6e4
Compare
| // +optional | ||
| DefaultNodeSelector string `json:"defaultNodeSelector,omitempty"` | ||
| // MastersSchedulable allows masters nodes to be schedulable. This means, if there | ||
| // are n no of master nodes in the cluster, all of them would be made schedulable. |
There was a problem hiding this comment.
why mention n? "This means that all of them would be made schedulable."
There was a problem hiding this comment.
Changed it to 10 as suggested by @deads2k
| // +optional | ||
| DefaultNodeSelector string `json:"defaultNodeSelector,omitempty"` | ||
| // MastersSchedulable allows masters nodes to be schedulable. This means, if there | ||
| // are n no of master nodes in the cluster, all of them would be made schedulable. |
| // +optional | ||
| DefaultNodeSelector string `json:"defaultNodeSelector,omitempty"` | ||
| // MastersSchedulable allows masters nodes to be schedulable. This means, if there | ||
| // are n no of master nodes in the cluster, all of them would be made schedulable. |
There was a problem hiding this comment.
Done. Thanks :)
| // Important Note: Once the workload pods start running on the master nodes, there | ||
| // is a very good chance that performance of control plane components is impacted. | ||
| // Please turn on this field after doing due deligence. | ||
| // +optional |
There was a problem hiding this comment.
You need to indicate what the default is.
| // so that workload pods can run on them. | ||
| // Important Note: Once the workload pods start running on the master nodes, there | ||
| // is a very good chance that performance of control plane components is impacted. | ||
| // Please turn on this field after doing due deligence. |
There was a problem hiding this comment.
run a spell check on your doc. diligence isn't it?
There was a problem hiding this comment.
Yes it is. I changed it. Thanks for catching it.
There was a problem hiding this comment.
and what do you use for spell checking? I haven't tried anything yet of that sort and something for fedora?
c7db6e4 to
fc38076
Compare
| // +optional | ||
| DefaultNodeSelector string `json:"defaultNodeSelector,omitempty"` | ||
| // MastersSchedulable allows masters nodes to be schedulable. This means, if there | ||
| // are 10 master nodes in the cluster, all of them would be made schedulable, |
There was a problem hiding this comment.
same old question: what does talking about the number of masters add to the contents here? It does not matter whether we 2, 10 or 100 masters. All is all :-)
| // MastersSchedulable allows masters nodes to be schedulable. This means, if there | ||
| // are 10 master nodes in the cluster, all of them would be made schedulable, | ||
| // so that workload pods can run on them. The default value for this field is false, | ||
| // meaning none of the master nodes are schedulable |
| // meaning none of the master nodes are schedulable | ||
| // Important Note: Once the workload pods start running on the master nodes, | ||
| // extreme care must be taken to ensure that cluster-critical control plane components | ||
| // are not impacted |
fc38076 to
a0a3fe6
Compare
| // +optional | ||
| DefaultNodeSelector string `json:"defaultNodeSelector,omitempty"` | ||
| // MastersSchedulable allows masters nodes to be schedulable. When this flag is | ||
| // turned on, all the master nodes in the cluster would be made schedulable, |
There was a problem hiding this comment.
"would be made" or "will be made" ?
a0a3fe6 to
f82d253
Compare
| // are not impacted. | ||
| // Please turn on this field after doing due diligence. | ||
| // +optional | ||
| MastersSchedulable bool `json:"MastersSchedulable"` |
f82d253 to
7d8974d
Compare
|
/lgtm |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: ravisantoshgudimetla, sttts 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 |
By default, the MCO's kubelet configuration injects a taint to disable scheduling. This adds support in the MCO for watching the API recently added to allow the masters to be schedulable. openshift/api#366 Use cases here are for 3 node bare metal clusters (which have significant resources on the masters), as well as CodeReady Containers which wants to make a single node OpenShift as a VM. Closes: openshift#763
Add field to make % of masters to be schedulable. This is part of RHHI.next effort, where we want master nodes to be schedulable. For more context, please refer to:
https://docs.google.com/document/d/1FPvz3TyKEagXDekHhKSo7sCqHTxWnITG5pBOG4yUJgA/edit
openshift/machine-config-operator#763 (comment)