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

install sudo to be able to do db migrations from the container's console #566

Merged
merged 1 commit into from
Mar 12, 2024

Conversation

au-ee
Copy link
Contributor

@au-ee au-ee commented Mar 12, 2024

We have Part-DB running containerized as a K8s deployment.
After an update, we connect to the server pod, install sudo and do the db migration as www-data.
We plan to do the migration with an init container in the future, but until we manage to do that, it would be great if you accepted to include sudo into the container image.

Thanks!

@jbtronics
Copy link
Member

Hmm I would think that you should be able to execute a shell in the containers under another user from the host system. But I dont see anything speaking against including sudo, so thats fine I think.

The new docker image will probably contain automatic database migrations, but I need to figure out a good mechanism to perferm backups beforehands.

@jbtronics jbtronics merged commit 7c258d2 into Part-DB:master Mar 12, 2024
@au-ee
Copy link
Contributor Author

au-ee commented Mar 12, 2024

With Kuberentes/kubectl, there is no builtin way of attaching to a pod as a different user. You could use the container engine's tools but for that you would have to be logged in on the node currently running the workload.

Thanks for merging!

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

Successfully merging this pull request may close these issues.

2 participants