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

Assign ownership of backup pvc to postgres image's uid #1854

Open
wants to merge 1 commit into
base: devel
Choose a base branch
from

Conversation

ranvit
Copy link
Contributor

@ranvit ranvit commented May 10, 2024

SUMMARY

Backups are failing because the postgres image runs as uid 26 that doesn't have perms to the backup PVC. This fixes #1830

ISSUE TYPE
  • Bug, Docs Fix or other nominal change
ADDITIONAL INFORMATION

The other option is to have the db-management pod run as root (uid 0), but I dont think thats the preferred solution.

@kurokobo
Copy link
Contributor

@ranvit
Hi, thanks for working on this!

Note that AFAIK changing owner and permission for PVC is NOT required for all users, but only required for specific users e.g. on hostPath or longhorn on k8s. So adding init container with root privilege by default may cause side effects for those who are on the k8s or OpenShift where the issue does not exist.

There is already similar implementation for PVC for PSQL to change owner and permission, so I think it would be better to follow existing implementation instead of going different way. How do you think? The exising implementation is having a flag to enable init container to invoke specific commands. Refer to: #1805

@fosterseth
Copy link
Member

fosterseth commented May 15, 2024

As @kurokobo mentioned, we should make this init container optional, following the same pattern we did in #1805

also we should use postgres image instead of busybox, try to use same variable names as other postgres init implementation, etc..

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