-
Notifications
You must be signed in to change notification settings - Fork 307
Unconditionally put servername in annotations #887
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2166,11 +2166,11 @@ def _build_pod_labels(self, extra_labels): | |
|
||
def _build_common_annotations(self, extra_annotations): | ||
# Annotations don't need to be escaped | ||
annotations = {'hub.jupyter.org/username': self.user.name} | ||
if self.name: | ||
annotations['hub.jupyter.org/servername'] = self.name | ||
annotations["hub.jupyter.org/kubespawner-version"] = __version__ | ||
annotations["hub.jupyter.org/jupyterhub-version"] = jupyterhub.__version__ | ||
annotations = { | ||
'hub.jupyter.org/username': self.user.name, | ||
"hub.jupyter.org/kubespawner-version": __version__, | ||
"hub.jupyter.org/jupyterhub-version": jupyterhub.__version__, | ||
} | ||
|
||
annotations.update(extra_annotations) | ||
return annotations | ||
|
@@ -2285,6 +2285,8 @@ async def get_pod_manifest(self): | |
annotations = self._build_common_annotations( | ||
self._expand_all(self.extra_annotations) | ||
) | ||
# Unconditionally put servername on the pods | ||
annotations['hub.jupyter.org/servername'] = self.name | ||
Comment on lines
2285
to
+2289
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It looks like the unconditional assignment following right after calling _build_common_annotations should only be relevant if self.extra_annotations were declaring another annotations = self._build_common_annotations(
self._expand_all(self.extra_annotations)
)
# Unconditionally put servername on the pods
annotations['hub.jupyter.org/servername'] = self.name I wonder if its really a kubespawner issue, or z2jh / end-user issue based on this. |
||
|
||
return make_pod( | ||
name=self.pod_name, | ||
|
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.
With this change we wouldn't get the servername annotation on PVCs etc
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.
PVCs are complicated because the template can be changed to create a shared or unshared volume.