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

Simply mount options for uid/gid #16

Closed
msau42 opened this issue May 1, 2023 · 8 comments
Closed

Simply mount options for uid/gid #16

msau42 opened this issue May 1, 2023 · 8 comments
Labels
enhancement New feature or request

Comments

@msau42
Copy link
Collaborator

msau42 commented May 1, 2023

Right now users have to set the driver's mount options to match the uid/gid settings.

Is UID required, or is gid/fsgroup sufficient? Normally for pod volumes, having the volume ownership match the fsgroup (ie supplemental group of the contaner) is enough and uid for the volume doesn't matter.

If you enable delegate fsgroup to csidriver, then k8s will send over the fsgroup id to the NodePublishVolume call, so that could eliminate needing to repeat gid in the mount options.

@msau42
Copy link
Collaborator Author

msau42 commented May 19, 2023

Also related, evaluate fsGroupPolicy as well.

@songjiaxun songjiaxun added the enhancement New feature or request label Jul 12, 2023
@songjiaxun
Copy link
Collaborator

The driver supports Delegate fsGroup to CSI Driver after the commit. This will be included in the next release.

With this feature, users do not need to explicitly specify uid or gid on the gcsfuse mount options. They can just specify Pod.spec.securityContext.fsGroup, and the fsGroup id will be automatically passed to gcsfuse gid flag. Meanwhile, the file-mode and dir-mode will be set as 664 and 775 respectively. Users can still overwrite these flags, meaning the exiting workloads won't be affected.

@zevisert
Copy link

zevisert commented Dec 7, 2023

I haven't tested yet, but isn't this closed by release 0.1.7?

@zevisert
Copy link

zevisert commented Dec 7, 2023

I have a PodTemplateSpec.spec.securityContext.fsGroup and I still see

gcsfuse mounting with args [gcsfuse --uid 0 --gid 0 --temp-dir /gcsfuse-tmp/...

Is there a mount option or annotation I need to provide to use this, or is it simply not rolled out to the GKE-managed version yet?

@songjiaxun
Copy link
Collaborator

Hi @zevisert , could you provide your cluster version? It is highly likely that the new version that includes this enhancement has not been rolled out to all the cluster versions yet.

@zevisert
Copy link

zevisert commented Dec 8, 2023

We're using the regular release channel default right now, so that's 1.27.3-gke.100 as of today

@songjiaxun
Copy link
Collaborator

I can confirm that 1.27.3-gke.100 does not container the new feature. I am updating the release note, from where you can see which GKE version contains the new feature. The documentation will be updated shortly.

@songjiaxun
Copy link
Collaborator

songjiaxun commented Jan 11, 2024

The doc is updated to describe which GKE version includes the feature: https://github.com/GoogleCloudPlatform/gcs-fuse-csi-driver/tree/main?tab=readme-ov-file#gke-compatibility

@zevisert This feature was included in CSI version v0.1.7. As of today, the GKE version 1.27.8-gke.1067000 in the regular channel includes the feature.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants