Merge pull request #521 from vlboiko/propagate_host_mount_config

feat: propagate default host configuration files to csi node
This commit is contained in:
Kubernetes Prow Robot 2023-10-17 17:16:07 +02:00 committed by GitHub
commit ad1a47b84c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 18 additions and 0 deletions

View File

@ -47,6 +47,7 @@ The following table lists the configurable parameters of the latest NFS CSI Driv
| `driver.mountPermissions` | default mounted folder permissions | `0`
| `feature.enableFSGroupPolicy` | enable [`fsGroupPolicy`](https://kubernetes.io/blog/2020/12/14/kubernetes-release-1.20-fsgroupchangepolicy-fsgrouppolicy/#allow-csi-drivers-to-declare-support-for-fsgroup-based-permissions) on a k8s 1.20+ cluster | `true` |
| `feature.enableInlineVolume` | enable inline volume | `false` |
| `feature.propagateHostMountOptions` | use the default host NFS mount configuration file [`/etc/nfsmount.conf`](https://man7.org/linux/man-pages/man5/nfsmount.conf.5.html) and/or the default host `/etc/nfsmount.d` mount configuration directory as source for mount options | `false` |
| `kubeletDir` | alternative kubelet directory | `/var/lib/kubelet` |
| `image.nfs.repository` | csi-driver-nfs image | `registry.k8s.io/sig-storage/nfsplugin` |
| `image.nfs.tag` | csi-driver-nfs image tag | `latest` |

View File

@ -125,6 +125,12 @@ spec:
- name: pods-mount-dir
mountPath: {{ .Values.kubeletDir }}/pods
mountPropagation: "Bidirectional"
{{- if .Values.feature.propagateHostMountOptions }}
- name: host-nfsmount-conf
mountPath: /etc/nfsmount.conf
- name: host-nfsmount-conf-d
mountPath: /etc/nfsmount.conf.d
{{- end }}
resources: {{- toYaml .Values.node.resources.nfs | nindent 12 }}
volumes:
- name: socket-dir
@ -139,3 +145,13 @@ spec:
path: {{ .Values.kubeletDir }}/plugins_registry
type: Directory
name: registration-dir
{{- if .Values.feature.propagateHostMountOptions }}
- hostPath:
path: /etc/nfsmount.conf
type: FileOrCreate
name: host-nfsmount-conf
- hostPath:
path: /etc/nfsmount.conf.d
type: DirectoryOrCreate
name: host-nfsmount-conf-d
{{- end }}

View File

@ -41,6 +41,7 @@ driver:
feature:
enableFSGroupPolicy: true
enableInlineVolume: false
propagateHostMountOptions: false
kubeletDir: /var/lib/kubelet