Create users in k8s deployment
-
HI,
I am looking for a way to create Jsreport users deployed in Kubernetes without volume persistence.
Is it possible to use a ConfigMap?
Thank you for your help.
-
The custom users need to be persisted.
However, you can create a startup script that will import or create them.
-
The startup script idea mentioned here is probably your best bet for a stateless setup. You could essentially pack your user creation logic into a small script and run it via an initContainer or a post-start hook in your K8s deployment.
Another way to handle it without persistence is to use the jsreport CLI to import a prepared backup file (including the users) during the container's boot sequence. It keeps things clean and ensures your environment is identical every time it spins up.