-
Notifications
You must be signed in to change notification settings - Fork 584
Make master nodes schedulable #366
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
Make master nodes schedulable #366
Conversation
config/v1/types_scheduling.go
Outdated
| // 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The naming seems awkward; how about just MaxMastersSchedulable or so, a bit like RollingUpdateDeployment's MaxUnavailable?
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 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
config/v1/types_scheduling.go
Outdated
| // 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
@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.
config/v1/types_scheduling.go
Outdated
| // +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 |
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.
nit: in the future
config/v1/types_scheduling.go
Outdated
| // 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rounding down means that 33% becomes zero master.
7d3f3d7 to
c7db6e4
Compare
config/v1/types_scheduling.go
Outdated
| // +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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why mention n? "This means that all of them would be made schedulable."
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.
Changed it to 10 as suggested by @deads2k
config/v1/types_scheduling.go
Outdated
| // +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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use an actual number.
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.
Done
config/v1/types_scheduling.go
Outdated
| // +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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove early period.
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.
Done. Thanks :)
config/v1/types_scheduling.go
Outdated
| // 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You need to indicate what the default is.
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.
Done
config/v1/types_scheduling.go
Outdated
| // 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
run a spell check on your doc. diligence isn't it?
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.
Yes it is. I changed it. Thanks for catching it.
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.
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
config/v1/types_scheduling.go
Outdated
| // +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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 :-)
config/v1/types_scheduling.go
Outdated
| // 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 |
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.
full-stop.
config/v1/types_scheduling.go
Outdated
| // 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 |
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.
full-stop.
fc38076 to
a0a3fe6
Compare
config/v1/types_scheduling.go
Outdated
| // +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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"would be made" or "will be made" ?
a0a3fe6 to
f82d253
Compare
config/v1/types_scheduling.go
Outdated
| // are not impacted. | ||
| // Please turn on this field after doing due diligence. | ||
| // +optional | ||
| MastersSchedulable bool `json:"MastersSchedulable"` |
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.
lower-case
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)