Add a preStart hook
See original GitHub issueThis would be similar to postBuild, but would be run at runtime, before execution of the actual notebook. This easily allows things such as:
- setting environment variables at runtime
- Minor adjustments that can’t be performed at build time
- New things we haven’t thought of yet!
- Custom parameters for notebooks / other applications
To prevent people from putting too many things here, it should have a default short timeout (5s?) to start.
The requirements for this script should be:
- Be marked executable, can be in any language
- Receives as parameters arguments to
exec
that it must perform as a final line to actually start the process we want (we will provide templates for this in various languages) - Not run for more than x seconds.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:2
- Comments:12 (10 by maintainers)
Top Results From Across the Web
add prestart hook support by terinjokes · Pull Request #2044
This changeset adds support for adding prestart hooks to controller-runtime's manager implementation. This hook runs after the manager has ...
Read more >Container Lifecycle Hooks - Learn Cloud Native
How about the preStart hook? ... The concept of hooks is well-known in the tech world. Events usually trigger hooks, and they allow...
Read more >Why K8S don't support PreStart Hook - Stack Overflow
And l am actually writing a controller, l want to hijack the pod creation event and insert a command before the main pod...
Read more >Adding SCCM PreStart media hook to MDT boot media
1. In SCCM console go to Operating system- boot images , Right click and select create a boot image using MDT · 2....
Read more >Files · add-prestart-hook-to-update-structure · xivo.solutions / docker ...
This is the Git repo of the Docker "Official Image" for postgres (not to be confused with any official postgres image provided by...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
ping on this issue as a few people brought up a use-case @ the binder/jupyterhub talk here in Paris today:
many folks want to decouple the “content” of the repository from the “environment” needed to run that content (e.g. they want to be able to have notebooks live online independently of a Binder repo, and use the repo just to define the environment needed. Then they could update notebooks without needing to re-build the Binder image each time. This could be accomplished with a script such as this one by using
gitpull
or something like this to pull in content after the server starts.I think this PR is firmly in the territory of “the project is 👍 on seeing this happen, it’s just a question of somebody having the time to submit a PR!”