-
Notifications
You must be signed in to change notification settings - Fork 304
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
[REVIEW] Add tolerations and node/pod affinities, add field verifications, add some default values #205
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
consideRatio
force-pushed
the
tolerations-pr
branch
2 times, most recently
from
July 4, 2018 11:34
1a31974
to
8a1c134
Compare
consideRatio
changed the title
Add tolerations to the pod object
Support tolerations and node/pod affinities
Jul 4, 2018
consideRatio
changed the title
Support tolerations and node/pod affinities
[WIP] Support tolerations and node/pod affinities
Jul 4, 2018
consideRatio
force-pushed
the
tolerations-pr
branch
3 times, most recently
from
July 5, 2018 08:01
7e9d33c
to
4b736ea
Compare
consideRatio
changed the title
[WIP] Support tolerations and node/pod affinities
Support tolerations and node/pod affinities
Jul 5, 2018
consideRatio
changed the title
Support tolerations and node/pod affinities
[WIP] Support tolerations and node/pod affinities
Jul 5, 2018
consideRatio
force-pushed
the
tolerations-pr
branch
4 times, most recently
from
July 5, 2018 11:26
f6686f6
to
daddbcc
Compare
consideRatio
changed the title
[WIP] Support tolerations and node/pod affinities
Support tolerations and node/pod affinities
Jul 5, 2018
consideRatio
force-pushed
the
tolerations-pr
branch
6 times, most recently
from
July 5, 2018 16:33
4af12f7
to
ea73626
Compare
consideRatio
changed the title
Support tolerations and node/pod affinities
Add tolerations and node/pod affinities, add field verifications, add some default values
Jul 5, 2018
consideRatio
force-pushed
the
tolerations-pr
branch
4 times, most recently
from
July 6, 2018 17:55
4f8c742
to
8133cd8
Compare
consideRatio
changed the title
Add tolerations and node/pod affinities, add field verifications, add some default values
[WIP] Add tolerations and node/pod affinities, add field verifications, add some default values
Jul 7, 2018
consideRatio
added a commit
to consideRatio/zero-to-jupyterhub-k8s
that referenced
this pull request
Jul 10, 2018
For use with the kubespawner features introduced in jupyterhub/kubespawner#205.
consideRatio
added a commit
to consideRatio/zero-to-jupyterhub-k8s
that referenced
this pull request
Jul 10, 2018
For use with the kubespawner features introduced in jupyterhub/kubespawner#205.
consideRatio
force-pushed
the
tolerations-pr
branch
2 times, most recently
from
July 10, 2018 15:39
2a81d01
to
c1c39dd
Compare
consideRatio
force-pushed
the
tolerations-pr
branch
from
August 1, 2018 21:36
26c935b
to
4273c34
Compare
consideRatio
force-pushed
the
tolerations-pr
branch
from
August 2, 2018 01:36
4273c34
to
3445a8d
Compare
consideRatio
added a commit
to consideRatio/zero-to-jupyterhub-k8s
that referenced
this pull request
Aug 2, 2018
For use with the kubespawner features introduced in jupyterhub/kubespawner#205.
consideRatio
changed the title
Add tolerations and node/pod affinities, add field verifications, add some default values
[WIP] Add tolerations and node/pod affinities, add field verifications, add some default values
Aug 2, 2018
consideRatio
changed the title
[WIP] Add tolerations and node/pod affinities, add field verifications, add some default values
[REVIEW] Add tolerations and node/pod affinities, add field verifications, add some default values
Aug 2, 2018
consideRatio
added a commit
to consideRatio/zero-to-jupyterhub-k8s
that referenced
this pull request
Aug 2, 2018
For use with the kubespawner features introduced in jupyterhub/kubespawner#205.
This was referenced Aug 8, 2018
betatim
added a commit
that referenced
this pull request
Aug 9, 2018
[Part 2 of #205] Added docs on how to run tests
minrk
added a commit
that referenced
this pull request
Aug 10, 2018
[Part 1 of #205] Refreshed development instructions
consideRatio
added a commit
that referenced
this pull request
Aug 10, 2018
…ation [Part 3 of #205] Added utils for k8s model verification
18 tasks
consideRatio
added a commit
to consideRatio/zero-to-jupyterhub-k8s
that referenced
this pull request
Aug 12, 2018
For use with the kubespawner features introduced in jupyterhub/kubespawner#205.
consideRatio
added a commit
to consideRatio/zero-to-jupyterhub-k8s
that referenced
this pull request
Aug 14, 2018
For use with the kubespawner features introduced in jupyterhub/kubespawner#205.
minrk
added a commit
that referenced
this pull request
Aug 17, 2018
[Part 4 of #205] Bugfixes, input verification and testing - Review gamified!
minrk
added a commit
that referenced
this pull request
Aug 17, 2018
[Part 5 of #205] Tolerations for node taints
minrk
added a commit
that referenced
this pull request
Aug 18, 2018
[Part 6 of #205] priority_class_name
minrk
added a commit
that referenced
this pull request
Aug 18, 2018
[Part 7 of #205] Affinities (node, pod, anti_pod - required and preferred)
consideRatio
added a commit
to consideRatio/zero-to-jupyterhub-k8s
that referenced
this pull request
Aug 19, 2018
For use with the kubespawner features introduced in jupyterhub/kubespawner#205.
consideRatio
added a commit
to consideRatio/zero-to-jupyterhub-k8s
that referenced
this pull request
Aug 19, 2018
For use with the kubespawner features introduced in jupyterhub/kubespawner#205.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Review of ... would be great!
Your time is valuable, so I tried to summarize some things that could be considered during a review. I'd love to have this merged and verified to work properly before JupyterCon 2018 and the workshop we will have.
logger
in the Files changed section of the PR and you will see what I refer to. Fromspawner.py
theopjects.py
functionmake_pod(... logger=self.log ...)
is called which in turns passes the logger onwards to a function defined inutils.py
with the signatureupdate_k8s_model(target, source, logger=None, origin=None):
whereorigin
is giving some details relevant to log.setup.py
that KubeSpawner to have version 0.9.1 instead of 0.8.1 when published as a package. Is this okay?kubespawner
works by overriding the previous kubespawner version, it can be done in a hub's Dockerfile like this:help="""...
documentation in the traitlets found inspawner.py
? Should I improve some methods docstring?spawner.get_pod_manifest()
once also rather than just directly calling the standalonemake_pod()
function defined inobjects.py
Thank you for your time, I appreciate it a lot! ❤️
PR Status
PR Summary
Added configuration
Added support for various configuration fields related to pod scheduling. As @gweis pointed out,
tolerations
and similar fields could previously be set usingextra_pod_config
. This method has some limitations though and should be considered an escape hatch until we have dedicated options available, and this is why this PR is useful. With dedicated fields will be easier for the user, so much that this was essential to make the fields configurable in the z2jh repo. With dedicated fields like this we can also make the user fail faster on invalid configurations thanks to better verification. We can also extend fields likenode_affinity_required
easier thanextra_pod_config.affinity.nodeAffinity.requiredDuringSchedulingIgnoredDuringExecution.nodeSelectorTerms
.The added traitlets
scheduler_name
tolerations
node_affinity_preferred
node_affinity_required
pod_affinity_preferred
pod_affinity_required
pod_anti_affinity_preferred
pod_anti_affinity_required
priority_class_name
Verification
Since the k8s resources being set has an schema the provided values can be verified. Such verification allows us to fail fast, and is in practice done by using
kubernetes.client.models
and objects likeV1Toleration
within it. If these are initialized with faulty fields, we fail fast.Feedback from
extra_pod_config
mergeKubeSpawner now logs a warning if
extra_pod_config
overrides a value set in another way.