csiDriver:
  name: "driveripper.zfs-gen-nfs-enc1"

storageClasses:
- name: zfs-gen-nfs-enc1
  defaultClass: false
  reclaimPolicy: Delete
  volumeBindingMode: Immediate
  allowVolumeExpansion: true
  parameters:
    fsType: nfs
  mountOptions:
  - async
  - noatime
  secrets:
    provisioner-secret:
    controller-publish-secret:
    node-stage-secret:
    node-publish-secret:
    controller-expand-secret:

volumeSnapshotClasses: []

driver:
  config:
    driver: zfs-generic-nfs
    sshConnection:
      host: driveripper.reeseapps.com
      port: 22
      username: democratic
      privateKey: ""

    zfs:
      cli:
        sudoEnabled: true
        paths:
          zfs: /usr/sbin/zfs
          zpool: /usr/sbin/zpool
          sudo: /usr/bin/sudo
          chroot: /usr/sbin/chroot
      
      datasetProperties:
       "org.freenas:description": "{{ parameters.[csi.storage.k8s.io/pvc/namespace] }}/{{ parameters.[csi.storage.k8s.io/pvc/name] }}"

      datasetParentName: enc1/dcsi/nfs
      # do NOT make datasetParentName and detachedSnapshotsDatasetParentName overlap
      # they may be siblings, but neither should be nested in the other
      # do NOT comment this option out even if you don't plan to use snapshots, just leave it with dummy value
      detachedSnapshotsDatasetParentName: enc1/dcsi/snaps

      datasetEnableQuotas: true
      datasetEnableReservation: false
      datasetPermissionsMode: "0777"
      datasetPermissionsUser: 0
      datasetPermissionsGroup: 0
      # datasetPermissionsAcls:
      # - "-m everyone@:full_set:allow"
      #- "-m u:kube:full_set:allow"

    nfs:
      # https://docs.oracle.com/cd/E23824_01/html/821-1448/gayne.html
      # https://www.hiroom2.com/2016/05/18/ubuntu-16-04-share-zfs-storage-via-nfs-smb/
      shareStrategy: "setDatasetProperties"
      shareStrategySetDatasetProperties:
        properties:
          #sharenfs: "rw,no_subtree_check,no_root_squash"
          sharenfs: "on"
          # share: ""
      shareHost: "driveripper.reeselink.com"
