Skip to content

Commit

Permalink
fix: do not shorten/modify annotation values
Browse files Browse the repository at this point in the history
closes #202
  • Loading branch information
rokroskar committed Aug 22, 2019
1 parent 8ec53ea commit ae833b3
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions jupyterhub/spawners.py
Original file line number Diff line number Diff line change
Expand Up @@ -270,8 +270,10 @@ def _expand_user_properties(self, template):
< 63 character pod names. We keep the last 16 characters which is
the server name hash.
Code adapted from
https://github.com/jupyterhub/kubespawner/blob/master/kubespawner/spawner.py
If the string being processed is not the pod or pvc template,
let it pass through.
"""
rendered = super()._expand_user_properties(template)
return rendered if len(rendered) <= 63 else rendered[:47] + rendered[-16:]
if template == self.pod_name_template or template == self.pvc_name_template:
return rendered if len(rendered) <= 63 else rendered[:47] + rendered[-16:]
return rendered

0 comments on commit ae833b3

Please sign in to comment.