fix: set fsGroupPolicy as ReadWriteOnceWithFSType by default

This commit is contained in:
andyzhangx 2022-05-12 11:31:44 +00:00
parent 5a59082977
commit 8357f90c8f
7 changed files with 2 additions and 31 deletions

View File

@ -26,7 +26,6 @@ Please refer to [`nfs.csi.k8s.io` driver parameters](./docs/driver-parameters.md
### Examples
- [Basic usage](./deploy/example/README.md)
- [fsGroupPolicy](./deploy/example/fsgroup)
### Troubleshooting
- [CSI driver troubleshooting guide](./docs/csi-debug.md)

View File

@ -38,7 +38,6 @@ The following table lists the configurable parameters of the latest NFS CSI Driv
|---------------------------------------------------|------------------------------------------------------------|-------------------------------------------------------------------|
| `driver.name` | alternative driver name | `nfs.csi.k8s.io` |
| `driver.mountPermissions` | mounted folder permissions name | `0777`
| `feature.enableFSGroupPolicy` | enable `fsGroupPolicy` on a k8s 1.20+ cluster | `true` |
| `feature.enableInlineVolume` | enable inline volume | `false` |
| `kubeletDir` | alternative kubelet directory | `/var/lib/kubelet` |
| `image.nfs.repository` | csi-driver-nfs image | `registry.k8s.io/sig-storage/nfsplugin` |

View File

@ -10,6 +10,4 @@ spec:
{{- if .Values.feature.enableInlineVolume}}
- Ephemeral
{{- end}}
{{- if .Values.feature.enableFSGroupPolicy}}
fsGroupPolicy: File
{{- end}}
fsGroupPolicy: ReadWriteOnceWithFSType

View File

@ -30,7 +30,6 @@ driver:
mountPermissions: 0777
feature:
enableFSGroupPolicy: true
enableInlineVolume: false
kubeletDir: /var/lib/kubelet

View File

@ -8,4 +8,4 @@ spec:
volumeLifecycleModes:
- Persistent
- Ephemeral
fsGroupPolicy: File
fsGroupPolicy: ReadWriteOnceWithFSType

View File

@ -1,24 +0,0 @@
# fsGroup Support
[fsGroupPolicy](https://kubernetes-csi.github.io/docs/support-fsgroup.html) feature is Beta from Kubernetes 1.20, and disabled by default, follow below steps to enable this feature.
### Option#1: Enable fsGroupPolicy support in [driver helm installation](../../../charts)
add `--set feature.enableFSGroupPolicy=true` in helm installation command.
### Option#2: Enable fsGroupPolicy support on a cluster with CSI driver already installed
```console
kubectl delete CSIDriver nfs.csi.k8s.io
cat <<EOF | kubectl create -f -
apiVersion: storage.k8s.io/v1beta1
kind: CSIDriver
metadata:
name: nfs.csi.k8s.io
spec:
attachRequired: false
volumeLifecycleModes:
- Persistent
fsGroupPolicy: File
EOF
```