config.yaml
singleuser:
image:
name: jupyter/minimal-notebook
tag: 7d427e7a4dde
profileList:
- display_name: Minimal Python Environment
description: "Only the basic notebook"
default: true
- display_name: Other Environment
description: ""
kubespawner_override:
image: jupyter/r-notebook:latest
lifecycleHooks:
postStart:
exec:
command: ["/bin/sh", "-c", "echo Hello from overridden handler > $HOME/message"]
lifecycleHooks:
postStart:
exec:
command: ["/bin/sh", "-c", "echo Hello from the postStart handler > $HOME/message"]
storage:
capacity: 5Gi
dynamic:
storageClass: nfs-client
memory:
limit: 8G
guarantee: 1G
cpu:
limit: 4
guarantee: .5
A configuration like this will always call the default lifecycle hook instead of the one in the profile.
Ah... but if you do...
profileList:
- display_name: Minimal Python Environment
description: "Only the basic notebook"
default: true
- display_name: Other Environment
description: ""
kubespawner_override:
image: jupyter/r-notebook:latest
lifecycle_hooks:
postStart:
exec:
command: ["/bin/sh", "-c", "echo Hello from overridden handler > $HOME/message"]
lifecycleHooks:
postStart:
exec:
command: ["/bin/sh", "-c", "echo Hello from the postStart handler > $HOME/message"]
Yikes... Ready for a dirty reason why this is the case?
lifecycleHooks)lifecycle_hooks)postStart).When you are writing things within kubespawner_override you are writing raw configuration for kubespawner, and must use the snake-case version.
@clancychilds thank you so much for documenting this and @mhuttner for reporting this experience!
Most helpful comment
Ah... but if you do...
Yikes... Ready for a dirty reason why this is the case?
lifecycleHooks)lifecycle_hooks)postStart).When you are writing things within
kubespawner_overrideyou are writing raw configuration for kubespawner, and must use the snake-case version.