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

[FEATURE]: Add FSGroupPolicy Support in Dell CSI Drivers for PowerScale and PowerStore #167

Closed
harishp8889 opened this issue Jan 27, 2022 · 0 comments
Assignees
Labels
area/csi-powerscale Issue pertains to the CSI Driver for Dell EMC PowerScale area/csi-powerstore Issue pertains to the CSI Driver for Dell EMC PowerStore type/feature A feature. This label is applied to a feature issues.
Milestone

Comments

@harishp8889
Copy link
Contributor

harishp8889 commented Jan 27, 2022

Describe the solution you'd like
As a User :

I should be able to set FSgroup policy in Kubernetes. Corresponding CSI Volume should be able to access with Kubernetes POD security context.

CSI Drivers can indicate whether or not they support modifying a volume's ownership or permissions when the volume is being mounted. This can be useful if the CSI Driver does not support the operation, or wishes to re-use volumes with constantly changing permissions.

See the design document for further information.

Example Usage
When creating the CSI Driver object, fsGroupPolicy is defined in the driver's spec. The following shows the hostpath driver with None included, indicating that the volumes should not be modified when mounted:

apiVersion: storage.k8s.io/v1kind: CSIDrivermetadata:name: hostpath.csi.k8s.iospec:# Supports persistent and ephemeral inline volumes.volumeLifecycleModes:- Persistent- Ephemeral# To determine at runtime which mode a volume uses, pod info and its# "csi.storage.k8s.io/ephemeral" entry are needed.podInfoOnMount: truefsGroupPolicy: None

Supported Modes
The following modes are supported:
None: Indicates that volumes will be mounted with no modifications, as the CSI volume driver does not support these operations.
File: Indicates that the CSI volume driver supports volume ownership and permission change via fsGroup, and Kubernetes may use fsGroup to change permissions and ownership of the volume to match user requested fsGroup in the pod's SecurityPolicy regardless of fstype or access mode.
ReadWriteOnceWithFSType: Indicates that volumes will be examined to determine if volume ownership and permissions should be modified to match the pod's security policy. Changes will only occur if the fsType is defined and the persistent volume's accessModes contains ReadWriteOnce. .
If undefined, fsGroupPolicy will default to ReadWriteOnceWithFSType, keeping the previous behavior.

Feature Gates
To use this field, Kubernetes 1.19 binaries must start with the CSIVolumeFSGroupPolicy feature gate enabled:

--feature-gates=CSIVolumeFSGroupPolicy=true

This is enabled by default on 1.20 and higher.

More information : https://kubernetes-csi.github.io/docs/support-fsgroup.html

Describe alternatives you've considered
Delegation feature

Additional context
NA

@harishp8889 harishp8889 added type/feature-request New feature request. This is the default label associated with a feature request issue. area/csi-powerstore Issue pertains to the CSI Driver for Dell EMC PowerStore area/csi-powerscale Issue pertains to the CSI Driver for Dell EMC PowerScale labels Jan 27, 2022
@harishp8889 harishp8889 added this to the v1.2.0 milestone Jan 27, 2022
@harishp8889 harishp8889 self-assigned this Jan 27, 2022
@hoppea2 hoppea2 added type/feature A feature. This label is applied to a feature issues. and removed type/feature-request New feature request. This is the default label associated with a feature request issue. labels Feb 15, 2022
@gallacher gallacher changed the title [FEATURE]:FSGroupPolicy [FEATURE]: Implement FSGroupPolicy Support in Dell CSI Drivers for PowerScale and PowerStore Mar 16, 2022
@gallacher gallacher changed the title [FEATURE]: Implement FSGroupPolicy Support in Dell CSI Drivers for PowerScale and PowerStore [FEATURE]: Add FSGroupPolicy Support in Dell CSI Drivers for PowerScale and PowerStore Mar 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/csi-powerscale Issue pertains to the CSI Driver for Dell EMC PowerScale area/csi-powerstore Issue pertains to the CSI Driver for Dell EMC PowerStore type/feature A feature. This label is applied to a feature issues.
Projects
None yet
Development

No branches or pull requests

3 participants