chore: Pass renku annotations to amalthea session spec#1206
chore: Pass renku annotations to amalthea session spec#1206
Conversation
|
You can access the deployment of this PR at https://renku-ci-ds-1206.dev.renku.ch |
Pull Request Test Coverage Report for Build 21868233007Details
💛 - Coveralls |
olevski
left a comment
There was a problem hiding this comment.
Hey Eike, thank you for doing this. Just two small things.
| from renku_data_services.notebooks.cr_amalthea_session import Metadata as AmaltheaMetadata | ||
| from renku_data_services.notebooks.cr_amalthea_session import Template | ||
| from renku_data_services.notebooks.crs import ( | ||
| AmaltheaSessionSpec, |
There was a problem hiding this comment.
It is not very obvious. But what we do is we import the stuff from renku_data_services.notebooks.cr_amalthea_session into renku_data_services.notebooks.crs and then we import these things only from renku_data_services.notebooks.crs.
| tolerations=tolerations_from_resource_class(resource_class, nb_config.sessions.tolerations_model), | ||
| affinity=node_affinity_from_resource_class(resource_class, nb_config.sessions.affinity_model), | ||
| serviceAccountName=service_account_name, | ||
| template=Template(metadata=AmaltheaMetadata(annotations=annotations)), |
There was a problem hiding this comment.
This is a shortcoming from before. But please add the username label. Currently we inject this in the manifest when we create it. But it is better to put it in here.
The label should be renku.io/safe-username: <keycloak-user-id>. You have this in the user - i.e. user.id. The user variable is passed into that whole big function as an argument.
Accompanies SwissDataScienceCenter/amalthea#964
/deploy