Skip to content
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

Update comment about why we save pod_name in db state #806

Merged
merged 1 commit into from
Nov 8, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 2 additions & 6 deletions kubespawner/spawner.py
Original file line number Diff line number Diff line change
Expand Up @@ -2128,12 +2128,8 @@ def get_state(self):
"""
Save state required to reinstate this user's pod from scratch

We save the `pod_name`, even though we could easily compute it,
because JupyterHub requires you save *some* state! Otherwise
it assumes your server is dead. This works around that.

It's also useful for cases when the `pod_template` changes between
restarts - this keeps the old pods around.
`pod_name` is saved as `pod_template` can change between hub restarts,
and we do not want to lose track of the old pods when that happens.

We also save the namespace and DNS name for use cases where the namespace is
calculated dynamically, or it changes between restarts.
Expand Down