No write permissions on the persistent volumes using the Helm chart on some storage class. #427

Closed
opened 2022-11-18 18:55:41 +00:00 by 1 · 3 comments

Hei,

I deployed garage on Kubernetes 1.25 (K3S) using the helm chart from the garage repository.

Using the K3S standard local-path storage class, the permissions of /mnt/meta and /mnt/data are both 777 and owned by root:root. garage runs with the user 1000 and it is able to write correctly.

However when using the openebs-zfspv storage class, the permissions are 755 still owned by root:root and garage cannot write.

I fixed the configuration problem by setting the following pod security context in the values.yaml file:

podSecurityContext:
  fsGroup: 1000
  fsGroupChangePolicy: OnRootMismatch

This may be necessary to put by default (I'm not sure about the fsGroupChangePolicy).

Also, checking the permissions could be done during startup to crash early, or also checked during the readyness check as discussed in the matrix channel.

Hei, I deployed garage on Kubernetes 1.25 (K3S) using the helm chart from the garage repository. Using the K3S standard `local-path` storage class, the permissions of `/mnt/meta` and `/mnt/data` are both `777` and owned by `root:root`. garage runs with the user `1000` and it is able to write correctly. However when using the `openebs-zfspv` storage class, the permissions are `755` still owned by `root:root` and garage cannot write. I fixed the configuration problem by setting the following pod security context in the `values.yaml` file: ```yaml podSecurityContext: fsGroup: 1000 fsGroupChangePolicy: OnRootMismatch ``` This may be necessary to put by default (I'm not sure about the `fsGroupChangePolicy`). Also, checking the permissions could be done during startup to crash early, or also checked during the readyness check as discussed in the matrix channel.
Contributor

I've also stumpled onto this and added fixes in this PR: #425

Feel free to test and provide feedback on the pullrequest

I've also stumpled onto this and added fixes in this PR: https://git.deuxfleurs.fr/Deuxfleurs/garage/pulls/425 Feel free to test and provide feedback on the pullrequest
Contributor

@1
Since #425 was merged, this should be resolved by now

@1 Since #425 was merged, this should be resolved by now
Owner

Closing for now, feel free to re-open if this issue is not solved

Closing for now, feel free to re-open if this issue is not solved
Sign in to join this conversation.
No Milestone
No Assignees
3 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: Deuxfleurs/garage#427
No description provided.