Our developers/deployers are used to be able to launch mediawiki maintenance scripts using mwscript as follows:
- ssh to the maintenance server
- run mwscript <script-name> --wiki <wiki> or mwscript <script-name> <wiki>
How can we get developers to run one-off scripts on kubernetes?
I would imagine it would go as follows:
- Add a Job definition to the mediawiki chart. Make it possible to apply either the Deployment or a Job. The Job should allow values to inject the arguments to "mwscript".
- Create a dedicated namespace to run these one offs
- Each Job should be a separate helm release, if we want multiple Jobs to be launched in parallel - that's the only way these resources can share the same namespace. We need to check if it's possible to adapt our helmfile to accept arbitrary release names.
- A small wrapper called something like mwscript-k8s should check the user name, generate a random release name, run helm(file) passing the arguments from CLI as a value we'll inject as args for the container.