Skip to content
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

Allow overriding prestart scripts? #467

Open
pat-s opened this issue Feb 23, 2024 · 2 comments
Open

Allow overriding prestart scripts? #467

pat-s opened this issue Feb 23, 2024 · 2 comments

Comments

@pat-s
Copy link
Contributor

pat-s commented Feb 23, 2024

The prestart scripts do not work in all environments, especially not in ones where one is not running as root and cannot execute commands like update-ca-certificates or perform custom mount operations.

A config option which allows specifying the contents of prestart verbatim would be good to have. So far, we need to fork/deviate from the helm chart to be able to override/customize prestart scripts.

Would you be open for a PR which allows this?

@colearendt
Copy link
Member

Thanks so much for your PR in #453 !

Do you still need more flexibility on the prestart scripts?

We are definitely open to adding more flexibility here!

For what it's worth, the way things currently work:

flowchart TB;
  k8s("k8s pod - cmd")-->supervisord
  supervisord-->workbench-unit
  workbench-unit-->workbench-prestart
  supervisord-->launcher-unit
  launcher-unit-->launcher-prestart
  workbench-prestart-->wait-for-launcher
  wait-for-launcher-->workbench
  launcher-prestart-->launcher
  launcher-->wait-for-launcher

One way to create an escape hatch is by customizing the unit files (mounting over them, changing the config of supervisord directly / mounting over /etc/supervisord.conf, etc.):

flowchart TB;
  k8s("k8s pod - cmd")-->supervisord
  supervisord-->custom-workbench-unit
  custom-workbench-unit-->custom-workbench-prestart
  supervisord-->custom-launcher-unit
  custom-launcher-unit-->custom-launcher-prestart
  custom-workbench-prestart-->wait-for-launcher
  wait-for-launcher-->workbench
  custom-launcher-prestart-->launcher
  launcher-->wait-for-launcher

It's a bit tedious, so I definitely can see the argument for an easier way to customize the prestart scripts! Is #453 sufficient for you or do you still need a better escape hatch?

@pat-s
Copy link
Contributor Author

pat-s commented Mar 21, 2024

#453 helped to allow using RHEL-based images. Yet to debug and try things out I had to fork and customize the chart source locally as I couldn't overwrite the prestart scripts inline.

I am not sure if this is needed again at some point, but adding the possibility to have an inline override would surely make things easier for users in such cases.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants