Matching freenas examples from original repo

This commit is contained in:
D1StrX 2022-06-02 21:24:02 +02:00
parent 2b3491bf35
commit de66e2fa89
6 changed files with 66 additions and 25 deletions

View File

@ -72,6 +72,7 @@ iscsi:
#nameTemplate: "{{ parameters.[csi.storage.k8s.io/pvc/namespace] }}-{{ parameters.[csi.storage.k8s.io/pvc/name] }}" #nameTemplate: "{{ parameters.[csi.storage.k8s.io/pvc/namespace] }}-{{ parameters.[csi.storage.k8s.io/pvc/name] }}"
namePrefix: csi- namePrefix: csi-
nameSuffix: "-clustera" nameSuffix: "-clustera"
# add as many as needed # add as many as needed
targetGroups: targetGroups:
# get the correct ID from the "portal" section in the UI # get the correct ID from the "portal" section in the UI
@ -84,6 +85,7 @@ iscsi:
# only required if using Chap # only required if using Chap
targetGroupAuthGroup: targetGroupAuthGroup:
#extentCommentTemplate: "{{ parameters.[csi.storage.k8s.io/pvc/namespace] }}/{{ parameters.[csi.storage.k8s.io/pvc/name] }}"
extentInsecureTpc: true extentInsecureTpc: true
extentXenCompat: false extentXenCompat: false
extentDisablePhysicalBlocksize: true extentDisablePhysicalBlocksize: true

View File

@ -51,8 +51,8 @@ zfs:
datasetEnableQuotas: true datasetEnableQuotas: true
datasetEnableReservation: false datasetEnableReservation: false
datasetPermissionsMode: "0777" datasetPermissionsMode: "0777"
datasetPermissionsUser: root datasetPermissionsUser: 0
datasetPermissionsGroup: wheel datasetPermissionsGroup: 0
#datasetPermissionsAcls: #datasetPermissionsAcls:
#- "-m everyone@:full_set:allow" #- "-m everyone@:full_set:allow"
#- "-m u:kube:full_set:allow" #- "-m u:kube:full_set:allow"

View File

@ -46,7 +46,9 @@ zfs:
datasetProperties: datasetProperties:
aclmode: restricted aclmode: restricted
casesensitivity: mixed aclinherit: passthrough
acltype: nfsv4
casesensitivity: insensitive
datasetParentName: tank/k8s/a/vols datasetParentName: tank/k8s/a/vols
# do NOT make datasetParentName and detachedSnapshotsDatasetParentName overlap # do NOT make datasetParentName and detachedSnapshotsDatasetParentName overlap
@ -54,12 +56,41 @@ zfs:
detachedSnapshotsDatasetParentName: tank/k8s/a/snaps detachedSnapshotsDatasetParentName: tank/k8s/a/snaps
datasetEnableQuotas: true datasetEnableQuotas: true
datasetEnableReservation: false datasetEnableReservation: false
datasetPermissionsMode: "0777" datasetPermissionsMode: "0770"
datasetPermissionsUser: nobody
datasetPermissionsGroup: nobody # as appropriate create a dedicated user for smb connections
# and set this
datasetPermissionsUser: 65534
datasetPermissionsGroup: 65534
# CORE
#datasetPermissionsAclsBinary: setfacl
# SCALE
#datasetPermissionsAclsBinary: nfs4xdr_setfacl
# if using a user other than guest/nobody comment the 'everyone@' acl
# and uncomment the appropriate block below
datasetPermissionsAcls: datasetPermissionsAcls:
- "-m everyone@:full_set:allow" - "-m everyone@:full_set:fd:allow"
#- "-m u:kube:full_set:allow"
# CORE
# in CORE you cannot have multiple entries for the same principle
# or said differently, they are declarative so using -m will replace
# whatever the current value is for the principle rather than adding a
# entry in the acl list
#- "-m g:builtin_users:full_set:fd:allow"
#- "-m group@:modify_set:fd:allow"
#- "-m owner@:full_set:fd:allow"
# SCALE
# https://www.truenas.com/community/threads/get-setfacl-on-scale-with-nfsv4-acls.95231/
# -s replaces everything
# so we put this in specific order to mimic the defaults of SCALE when using the api
#- -s group:builtin_users:full_set:fd:allow
#- -a group:builtin_users:modify_set:fd:allow
#- -a group@:modify_set:fd:allow
#- -a owner@:full_set:fd:allow
smb: smb:
shareHost: server address shareHost: server address
@ -77,7 +108,7 @@ smb:
shareAllowedHosts: [] shareAllowedHosts: []
shareDeniedHosts: [] shareDeniedHosts: []
#shareDefaultPermissions: true #shareDefaultPermissions: true
shareGuestOk: true shareGuestOk: false
#shareGuestOnly: true #shareGuestOnly: true
#shareShowHiddenFiles: true #shareShowHiddenFiles: true
shareRecycleBin: true shareRecycleBin: true

View File

@ -37,7 +37,8 @@ zfs:
# total volume name (zvol/<datasetParentName>/<pvc name>) length cannot exceed 63 chars # total volume name (zvol/<datasetParentName>/<pvc name>) length cannot exceed 63 chars
# https://www.ixsystems.com/documentation/freenas/11.2-U5/storage.html#zfs-zvol-config-opts-tab # https://www.ixsystems.com/documentation/freenas/11.2-U5/storage.html#zfs-zvol-config-opts-tab
# standard volume naming overhead is 46 chars # standard volume naming overhead is 46 chars
# datasetParentName should therefore be 17 chars or less when using TrueNAS 12 or below # datasetParentName should therefore be 17 chars or less when using TrueNAS 12 or below (SCALE and 13+ do not have the same limits)
# for work-arounds see https://github.com/democratic-csi/democratic-csi/issues/54
datasetParentName: tank/k8s/b/vols datasetParentName: tank/k8s/b/vols
# do NOT make datasetParentName and detachedSnapshotsDatasetParentName overlap # do NOT make datasetParentName and detachedSnapshotsDatasetParentName overlap
# they may be siblings, but neither should be nested in the other # they may be siblings, but neither should be nested in the other
@ -62,6 +63,7 @@ iscsi:
#nameTemplate: "{{ parameters.[csi.storage.k8s.io/pvc/namespace] }}-{{ parameters.[csi.storage.k8s.io/pvc/name] }}" #nameTemplate: "{{ parameters.[csi.storage.k8s.io/pvc/namespace] }}-{{ parameters.[csi.storage.k8s.io/pvc/name] }}"
namePrefix: csi- namePrefix: csi-
nameSuffix: "-clustera" nameSuffix: "-clustera"
# add as many as needed # add as many as needed
targetGroups: targetGroups:
# get the correct ID from the "portal" section in the UI # get the correct ID from the "portal" section in the UI
@ -74,6 +76,7 @@ iscsi:
# only required if using Chap # only required if using Chap
targetGroupAuthGroup: targetGroupAuthGroup:
#extentCommentTemplate: "{{ parameters.[csi.storage.k8s.io/pvc/namespace] }}/{{ parameters.[csi.storage.k8s.io/pvc/name] }}"
extentInsecureTpc: true extentInsecureTpc: true
extentXenCompat: false extentXenCompat: false
extentDisablePhysicalBlocksize: true extentDisablePhysicalBlocksize: true

View File

@ -43,6 +43,8 @@ zfs:
datasetPermissionsMode: "0777" datasetPermissionsMode: "0777"
datasetPermissionsUser: 0 datasetPermissionsUser: 0
datasetPermissionsGroup: 0 datasetPermissionsGroup: 0
# not supported yet
#datasetPermissionsAcls: #datasetPermissionsAcls:
#- "-m everyone@:full_set:allow" #- "-m everyone@:full_set:allow"
#- "-m u:kube:full_set:allow" #- "-m u:kube:full_set:allow"

View File

@ -34,9 +34,10 @@ zfs:
# "org.freenas:test": "{{ parameters.foo }}" # "org.freenas:test": "{{ parameters.foo }}"
# "org.freenas:test2": "some value" # "org.freenas:test2": "some value"
datasetProperties: # these are managed automatically via the volume creation process when flagged as an smb volume
aclmode: restricted #datasetProperties:
casesensitivity: mixed # aclmode: restricted
# casesensitivity: mixed
datasetParentName: tank/k8s/a/vols datasetParentName: tank/k8s/a/vols
# do NOT make datasetParentName and detachedSnapshotsDatasetParentName overlap # do NOT make datasetParentName and detachedSnapshotsDatasetParentName overlap
@ -47,8 +48,10 @@ zfs:
datasetPermissionsMode: "0777" datasetPermissionsMode: "0777"
datasetPermissionsUser: 0 datasetPermissionsUser: 0
datasetPermissionsGroup: 0 datasetPermissionsGroup: 0
datasetPermissionsAcls:
- "-m everyone@:full_set:allow" # not supported yet in api
#datasetPermissionsAcls:
#- "-m everyone@:full_set:allow"
#- "-m u:kube:full_set:allow" #- "-m u:kube:full_set:allow"
smb: smb: