mirror of
https://github.com/lldap/lldap.git
synced 2026-04-25 08:15:52 +03:00
[GH-ISSUE #936] Bootrap.sh seems not executable #345
Labels
No labels
backend
blocked
bug
cleanup
dependencies
docker
documentation
duplicate
enhancement
enhancement
frontend
github_actions
good first issue
help wanted
help wanted
integration
invalid
ldap
pull-request
question
rust
rust
tests
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/lldap-lldap#345
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @flashpixx on GitHub (Jul 22, 2024).
Original GitHub issue: https://github.com/lldap/lldap/issues/936
Describe the bug
I'm try to run the
boostrap.shas init container on K8 and follow the the documentation https://github.com/lldap/lldap/blob/main/example_configs/bootstrap/bootstrap.mdTo Reproduce
Try to run
docker run lldap/lldap:2024-07-20-alpine /bootstrap/bootstrap.shor I'm using/app/bootstrap.shThe output is:
so it seems that the script could not be executed
Expected behavior
Executing the boostrap script to add user and groups
@nitnelave commented on GitHub (Jul 22, 2024):
The way you're invoking docker run just passes the bootstrap path to the LLDAP startup script (which expects an lldap command like "run").
What you want is to call the bootstrap instead of the LLDAP startup script, by changing the entry point of the container:
docker run lldap/lldap:2024-07-20-alpine --entrypoint /bootstrap/bootstrap.sh@flashpixx commented on GitHub (Jul 22, 2024):
The correct command seems to be:
But I'm not sure that it is posible to overwrite the entrypoint in a pod setup within Kubernetes, inmho I overwrite the command, see the docs https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/
It would be nice to run the boostrap script on an init container, and if the pod security is activated so it seems to to be possible to install other tools within the container.
Maybe a solution could be to extend the
docker-entrypoint.shwith an option flag--bootstrapto execute the bootstrapping and install the tools per defaultBut in general great work, I will use it for a data science project as central auth structure e.g. for Airflow, Jupyter, Spark etc
@nitnelave commented on GitHub (Jul 22, 2024):
I'm not very familiar with Kubernetes, so I didn't follow all your answer.
Is there anything I can help with?
@flashpixx commented on GitHub (Jul 22, 2024):
I think it is useful to change the
docker-entrypoint.shscript, but you have got a basic Kubernetes config, but a Helm Chart would be nice.I'm using LLDAP at the moment and I can make a fork for your project to create a Helm Chart. Can I send a pull request for a full Helm Chart to this repo with also changes on the shell-scripts / Dockerfiles etc, but it will take some time
@nitnelave commented on GitHub (Jul 22, 2024):
There's already a helm chart with bootstrap support (unofficial): https://artifacthub.io/packages/helm/djjudas21/lldap
@flashpixx commented on GitHub (Jul 22, 2024):
Thanks this is nice