Skip to content

Commit

Permalink
Update comment about why we save pod_name in db state
Browse files Browse the repository at this point in the history
  • Loading branch information
yuvipanda committed Nov 8, 2023
1 parent 9a6e092 commit b100071
Showing 1 changed file with 2 additions and 6 deletions.
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

0 comments on commit b100071

Please sign in to comment.