-
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?
Conversation
yuvipanda
commented
Apr 7, 2025
- Matches behavior of what we do with servername in labels
- Labels are escaped while annotations are not, making annotations suitable for filtering in metrics and dashboards
- Matches behavior of what we do with servername in labels - Labels are escaped while annotations are not, making annotations suitable for filtering in metrics and dashboards
for more information, see https://pre-commit.ci
annotations = self._build_common_annotations( | ||
self._expand_all(self.extra_annotations) | ||
) | ||
# Unconditionally put servername on the pods | ||
annotations['hub.jupyter.org/servername'] = self.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.
It looks like the unconditional assignment following right after calling _build_common_annotations should only be relevant if self.extra_annotations were declaring another hub.jupyter.org/servername
, which would have a blank string value or similar.
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.
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__, | ||
} |
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.