-
Notifications
You must be signed in to change notification settings - Fork 802
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
[TO BE SPLIT UP] User scheduler, user placeholders, node pool taints #758
[TO BE SPLIT UP] User scheduler, user placeholders, node pool taints #758
Conversation
afbbb45
to
6cab984
Compare
61e5cd8
to
df1bbc1
Compare
56db558
to
fb4d118
Compare
a3dadf3
to
8fa2e41
Compare
133dc70
to
e92733e
Compare
e92733e
to
b35773f
Compare
e968490
to
2b22a49
Compare
Closed and tracked in #841 |
schedulerName: user-scheduler | ||
{{- end }} | ||
{{- $_ := merge (dict "podKind" "user") . }} | ||
{{- $dummy := include "jupyterhub.prepareScope" $_ }} |
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.
This line uses a helper to set information in the $_ variable, this relevant information about the users affinity info for example, can be extracted thanks to the information is provided to the config.yaml but within extraConfig but instead being provided in a explicit fields @minrk .
[Part 1 of #758] Remove pod-culler remnants
[Part 2 of #758] user-scheduler added
[Part 3 of #758] Remove remnant pod-culler image
[Part 4 of #758] Bump k8s resources to v1.9 available API
[Part 5 of #758] Update outdated logic for hub restarts
[Part 6 of #758] Storage labels: configurable extras
[Part 7 of #758] Added `singleuser.tolerations`, for node taints
[Part 8 of #758] Added singleuser affinity configuration
[Part 10 of #758] Added `scheduling.podPriority`
[Part 11 of #758] Added `scheduling.userPlaceholder`
NOTE
This PR will be split up into pieces, see #841
This PR
While a cluster autoscaler which adds and removes nodes can improve cloud resource efficiency, some issues using it with this chart exists. This PR makes cluster autoscaling more robust and efficient to use.
PR Status
Fixed and alleviated issues
kube-dns
or a chart pod likehub
orproxy
has been scheduled on them instead of staying together on one nodeuser-placeholder
pods. You can configure that you want for example two placeholder pods, and they will trigger node scale up if they can't schedule just like a user, but when a user is arriving without available room for it to schedule the user-placeholder pods will make room for the real user. See the kubernetes documentation on pod priority and preemption to learn about the details.user-dummy
pods which mock real users but is easier to add / remove for testing purposes.Feature availability
K8s 1.11 is required for pod preemption and pod priority. K8s 1.11 is at the moment I'm writing this not yet available on GKE, and Helm lacks support for k8s 1.11 and we need to await Helm 2.11. We can help them out by by testing k8s 1.11 support.
Test this PR
To test all of the functionality, you must currently use a k8s 1.10 cluster with alpha features enabled. On GKE that requires new cluster to be setup. I've written down the steps needed to do so below.
Tooling setup
Cluster setup
hub.jupyter.org/node-purpose: core
hub.jupyter.org/node-purpose: user
and taint it withhub.jupyter.org_dedicated=user:NoSchedule
Chart installation
Try it
This PR allows for robust autoscaling allowing nodes to be added before they are required by creating a headroom of placeholder pods that will be evicted if no nodes are available.
By yourself
The demo assumes you have setup the user node pools machine type and the singleusers resource requests to fit 4 users per user node.
Look at a demo
TODO
Remaining...
Future...
When k8s 1.11 is required by the chart...
scheduling.k8s.io/v1beta1
as API group for the PriorityClass resource when this is testable on GKE without an alpha enabled cluster.References
helm version
gives me no response from the server). On #helm-dev on the kubernetes slack I learned that helm lacks support for k8s 1.11 and we will need to wait for helm 2.11 for it it seems.