-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
support nfs-client deployments better, example file
- Loading branch information
1 parent
c6c0c84
commit 1722951
Showing
6 changed files
with
172 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,139 @@ | ||
# driver only works with 1.16+ | ||
csiDriver: | ||
# should be globally unique for a given cluster | ||
name: "org.democratic-csi.nfs-client" | ||
|
||
storageClasses: | ||
- name: nfs-client | ||
defaultClass: false | ||
reclaimPolicy: Delete | ||
volumeBindingMode: Immediate | ||
allowVolumeExpansion: false | ||
parameters: | ||
fsType: nfs | ||
|
||
mountOptions: | ||
- noatime | ||
- nfsvers=3 | ||
secrets: | ||
provisioner-secret: | ||
controller-publish-secret: | ||
node-stage-secret: | ||
node-publish-secret: | ||
controller-expand-secret: | ||
|
||
# if your cluster supports snapshots you may enable below | ||
volumeSnapshotClasses: [] | ||
#- name: nfs-client | ||
# secrets: | ||
# snapshotter-secret: | ||
|
||
|
||
driver: | ||
config: | ||
#driver: | ||
# rest of per-driver config data/syntax | ||
driver: nfs-client | ||
instance_id: | ||
nfs: | ||
# make note of these 3, they are used below in various places | ||
shareHost: <IP or host> | ||
shareBasePath: "/some/path/to/nfs-client/storage" | ||
controllerBasePath: "/nfs-storage" | ||
|
||
dirPermissionsMode: "0777" | ||
dirPermissionsUser: root | ||
dirPermissionsGroup: root | ||
|
||
|
||
# There are 4 different approaches to installing the driver | ||
# 1: Run the controller service separated from the node service, mount the base share into the controller pod at run time | ||
# 2. Run the controller service separated from the node service, use an existing hostPath mount of the base share from the node in the controller pod | ||
# 3. Run the controller service jointly with the node service, mount the base share into the node pod at run time | ||
# 4. Run the controller service jointly with the node service, use an existing hostPath mount of the base share from the node in the node pod | ||
# | ||
# Uncomment the lines/sections below appropriate for your desired use-case | ||
|
||
controller: | ||
enabled: true | ||
|
||
externalResizer: | ||
enabled: false | ||
|
||
# For Options 1 and 2 | ||
#strategy: deployment | ||
|
||
# For Option 1 | ||
#hostNetwork: true | ||
#hostIPC: true | ||
|
||
# For Options 3 and 4 | ||
#strategy: node | ||
|
||
|
||
# Option 1 | ||
# do this if the nodes do NOT already have the base volume mounted out-of-band from k8s | ||
# driver: | ||
# securityContext: | ||
# allowPrivilegeEscalation: true | ||
# capabilities: | ||
# add: | ||
# - SYS_ADMIN | ||
# privileged: true | ||
# lifecycle: | ||
# postStart: | ||
# exec: | ||
# command: ["/bin/sh", "-c", "mkdir -p <controllerBasePath>; mount <shareHost>:<shareBasePath> <controllerBasePath>"] | ||
# preStop: | ||
# exec: | ||
# command: ["/bin/sh","-c","umount <controllerBasePath>"] | ||
|
||
# Option 2 | ||
# do this if all nodes DO have the base volume mounted out-of-band from k8s | ||
# driver: | ||
# securityContext: | ||
# allowPrivilegeEscalation: true | ||
# capabilities: | ||
# add: | ||
# - SYS_ADMIN | ||
# privileged: true | ||
# | ||
# extraVolumeMounts: | ||
# - name: nfs-storage | ||
# mountPath: <controllerBasePath> | ||
# mountPropagation: Bidirectional | ||
# | ||
# extraVolumes: | ||
# - name: nfs-storage | ||
# hostPath: | ||
# path: /already/mounted/path/to <shareHost>:<shareBasePath> | ||
# type: Directory | ||
|
||
|
||
# Options 3 and 4 | ||
#node: | ||
|
||
# Option 3 | ||
# do this if the nodes do NOT already have the base volume mounted out-of-band from k8s | ||
# driver: | ||
# lifecycle: | ||
# postStart: | ||
# exec: | ||
# command: ["/bin/sh", "-c", "mkdir -p <controllerBasePath>; mount <shareHost>:<shareBasePath> <controllerBasePath>"] | ||
# preStop: | ||
# exec: | ||
# command: ["/bin/sh","-c","umount <controllerBasePath>"] | ||
|
||
# Option 4 | ||
# do this if all nodes DO have the base volume mounted out-of-band from k8s | ||
# driver: | ||
# extraVolumeMounts: | ||
# - name: nfs-storage | ||
# mountPath: <controllerBasePath> | ||
# mountPropagation: Bidirectional | ||
# | ||
# extraVolumes: | ||
# - name: nfs-storage | ||
# hostPath: | ||
# path: /already/mounted/path/to <shareHost>:<shareBasePath> | ||
# type: Directory |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters