Merge remote-tracking branch 'origin/master' into next
This commit is contained in:
		
						commit
						300cae30fd
					
				|  | @ -63,6 +63,7 @@ Predominantly 3 things are needed: | ||||||
|   from `nfs-client-provisioner` to `democratic-csi`) |   from `nfs-client-provisioner` to `democratic-csi`) | ||||||
| - https://gist.github.com/deefdragon/d58a4210622ff64088bd62a5d8a4e8cc | - https://gist.github.com/deefdragon/d58a4210622ff64088bd62a5d8a4e8cc | ||||||
|   (migrating between storage classes using `velero`) |   (migrating between storage classes using `velero`) | ||||||
|  | - https://github.com/fenio/k8s-truenas (NFS/iSCSI over API with TrueNAS Scale) | ||||||
| 
 | 
 | ||||||
| ## Node Prep | ## Node Prep | ||||||
| 
 | 
 | ||||||
|  | @ -186,7 +187,7 @@ node: | ||||||
| 
 | 
 | ||||||
| and continue your democratic installation as usuall with other iscsi drivers. | and continue your democratic installation as usuall with other iscsi drivers. | ||||||
| 
 | 
 | ||||||
| #### Privilged Namespace | #### Privileged Namespace | ||||||
| democratic-csi requires privileged access to the nodes, so the namespace should allow for privileged pods. One way of doing it is via [namespace labels](https://kubernetes.io/docs/tasks/configure-pod-container/enforce-standards-namespace-labels/). | democratic-csi requires privileged access to the nodes, so the namespace should allow for privileged pods. One way of doing it is via [namespace labels](https://kubernetes.io/docs/tasks/configure-pod-container/enforce-standards-namespace-labels/). | ||||||
| Add the followin label to the democratic-csi installation namespace `pod-security.kubernetes.io/enforce=privileged` | Add the followin label to the democratic-csi installation namespace `pod-security.kubernetes.io/enforce=privileged` | ||||||
| ``` | ``` | ||||||
|  |  | ||||||
|  | @ -11,6 +11,10 @@ job "democratic-csi-iscsi-node" { | ||||||
| 
 | 
 | ||||||
|       env { |       env { | ||||||
|         CSI_NODE_ID = "${attr.unique.hostname}" |         CSI_NODE_ID = "${attr.unique.hostname}" | ||||||
|  |          | ||||||
|  |         # if you run into a scenario where your iscsi volumes are zeroed each time they are mounted, | ||||||
|  |         # you can configure the fs detection system used with the following envvar: | ||||||
|  |         #FILESYSTEM_TYPE_DETECTION_STRATEGY = "blkid" | ||||||
|       } |       } | ||||||
| 
 | 
 | ||||||
|       config { |       config { | ||||||
|  | @ -38,6 +42,15 @@ job "democratic-csi-iscsi-node" { | ||||||
|           source = "/" |           source = "/" | ||||||
|           readonly=false |           readonly=false | ||||||
|         } |         } | ||||||
|  |          | ||||||
|  |         # if you run into a scenario where your iscsi volumes are zeroed each time they are mounted, | ||||||
|  |         # you can try uncommenting the following additional mount block: | ||||||
|  |         #mount { | ||||||
|  |         #  type     = "bind" | ||||||
|  |         #  target   = "/run/udev" | ||||||
|  |         #  source   = "/run/udev" | ||||||
|  |         #  readonly = true | ||||||
|  |         #} | ||||||
|       } |       } | ||||||
| 
 | 
 | ||||||
|       template { |       template { | ||||||
|  |  | ||||||
|  | @ -42,6 +42,7 @@ zfs: | ||||||
|   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  | ||||||
|  |   # do NOT comment this option out even if you don't plan to use snapshots, just leave it with dummy value | ||||||
|   detachedSnapshotsDatasetParentName: tanks/k8s/b/snaps |   detachedSnapshotsDatasetParentName: tanks/k8s/b/snaps | ||||||
|   # "" (inherit), lz4, gzip-9, etc |   # "" (inherit), lz4, gzip-9, etc | ||||||
|   zvolCompression: |   zvolCompression: | ||||||
|  |  | ||||||
|  | @ -37,6 +37,7 @@ zfs: | ||||||
|   datasetParentName: tank/k8s/a/vols |   datasetParentName: tank/k8s/a/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 | ||||||
|  |   # do NOT comment this option out even if you don't plan to use snapshots, just leave it with dummy value | ||||||
|   detachedSnapshotsDatasetParentName: tank/k8s/a/snaps |   detachedSnapshotsDatasetParentName: tank/k8s/a/snaps | ||||||
|   datasetEnableQuotas: true |   datasetEnableQuotas: true | ||||||
|   datasetEnableReservation: false |   datasetEnableReservation: false | ||||||
|  |  | ||||||
|  | @ -42,6 +42,7 @@ zfs: | ||||||
|   datasetParentName: tank/k8s/a/vols |   datasetParentName: tank/k8s/a/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 | ||||||
|  |   # do NOT comment this option out even if you don't plan to use snapshots, just leave it with dummy value | ||||||
|   detachedSnapshotsDatasetParentName: tank/k8s/a/snaps |   detachedSnapshotsDatasetParentName: tank/k8s/a/snaps | ||||||
|   datasetEnableQuotas: true |   datasetEnableQuotas: true | ||||||
|   datasetEnableReservation: false |   datasetEnableReservation: false | ||||||
|  |  | ||||||
|  | @ -51,6 +51,7 @@ zfs: | ||||||
|   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  | ||||||
|  |   # do NOT comment this option out even if you don't plan to use snapshots, just leave it with dummy value | ||||||
|   detachedSnapshotsDatasetParentName: tanks/k8s/b/snaps |   detachedSnapshotsDatasetParentName: tanks/k8s/b/snaps | ||||||
|   # "" (inherit), lz4, gzip-9, etc |   # "" (inherit), lz4, gzip-9, etc | ||||||
|   zvolCompression: |   zvolCompression: | ||||||
|  |  | ||||||
|  | @ -47,6 +47,7 @@ zfs: | ||||||
|   datasetParentName: tank/k8s/a/vols |   datasetParentName: tank/k8s/a/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 | ||||||
|  |   # do NOT comment this option out even if you don't plan to use snapshots, just leave it with dummy value | ||||||
|   detachedSnapshotsDatasetParentName: tank/k8s/a/snaps |   detachedSnapshotsDatasetParentName: tank/k8s/a/snaps | ||||||
|   datasetEnableQuotas: true |   datasetEnableQuotas: true | ||||||
|   datasetEnableReservation: false |   datasetEnableReservation: false | ||||||
|  |  | ||||||
|  | @ -53,6 +53,7 @@ zfs: | ||||||
|   datasetParentName: tank/k8s/a/vols |   datasetParentName: tank/k8s/a/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 | ||||||
|  |   # do NOT comment this option out even if you don't plan to use snapshots, just leave it with dummy value | ||||||
|   detachedSnapshotsDatasetParentName: tank/k8s/a/snaps |   detachedSnapshotsDatasetParentName: tank/k8s/a/snaps | ||||||
|   datasetEnableQuotas: true |   datasetEnableQuotas: true | ||||||
|   datasetEnableReservation: false |   datasetEnableReservation: false | ||||||
|  |  | ||||||
|  | @ -9,21 +9,6 @@ spec: | ||||||
|   accessModes: |   accessModes: | ||||||
|     - ReadWriteOnce |     - ReadWriteOnce | ||||||
|   persistentVolumeReclaimPolicy: Retain |   persistentVolumeReclaimPolicy: Retain | ||||||
|   # can be used to handle CHAP |  | ||||||
|   # in the secret create the following keys: |  | ||||||
|   # |  | ||||||
|   #      # any arbitrary iscsiadm entries can be add by creating keys starting with node-db.<entry.name> |  | ||||||
|   #      # if doing CHAP |  | ||||||
|   #      node-db.node.session.auth.authmethod: CHAP |  | ||||||
|   #      node-db.node.session.auth.username: foo |  | ||||||
|   #      node-db.node.session.auth.password: bar |  | ||||||
|   # |  | ||||||
|   #      # if doing mutual CHAP |  | ||||||
|   #      node-db.node.session.auth.username_in: baz |  | ||||||
|   #      node-db.node.session.auth.password_in: bar |  | ||||||
|   #nodeStageSecretRef: |  | ||||||
|   #  name: some name |  | ||||||
|   #  namespace: some namespace |  | ||||||
|   mountOptions: [] |   mountOptions: [] | ||||||
|   csi: |   csi: | ||||||
|     driver: org.democratic-csi.node-manual |     driver: org.democratic-csi.node-manual | ||||||
|  | @ -31,6 +16,21 @@ spec: | ||||||
|     # can be ext4 or xfs |     # can be ext4 or xfs | ||||||
|     fsType: ext4 |     fsType: ext4 | ||||||
|     volumeHandle: unique-volumeid  # make sure it's a unique id in the cluster |     volumeHandle: unique-volumeid  # make sure it's a unique id in the cluster | ||||||
|  |     # can be used to handle CHAP | ||||||
|  |     # in the secret create the following keys: | ||||||
|  |     # | ||||||
|  |     #      # any arbitrary iscsiadm entries can be add by creating keys starting with node-db.<entry.name> | ||||||
|  |     #      # if doing CHAP | ||||||
|  |     #      node-db.node.session.auth.authmethod: CHAP | ||||||
|  |     #      node-db.node.session.auth.username: foo | ||||||
|  |     #      node-db.node.session.auth.password: bar | ||||||
|  |     # | ||||||
|  |     #      # if doing mutual CHAP | ||||||
|  |     #      node-db.node.session.auth.username_in: baz | ||||||
|  |     #      node-db.node.session.auth.password_in: bar | ||||||
|  |     #nodeStageSecretRef: | ||||||
|  |     #  name: some name | ||||||
|  |     #  namespace: some namespace | ||||||
|     volumeAttributes: |     volumeAttributes: | ||||||
|       portal: <ip:port> |       portal: <ip:port> | ||||||
|       #portals: <ip:port>,<ip:port>,... |       #portals: <ip:port>,<ip:port>,... | ||||||
|  |  | ||||||
|  | @ -9,9 +9,6 @@ spec: | ||||||
|   accessModes: |   accessModes: | ||||||
|     - ReadWriteMany |     - ReadWriteMany | ||||||
|   persistentVolumeReclaimPolicy: Retain |   persistentVolumeReclaimPolicy: Retain | ||||||
|   #nodeStageSecretRef: |  | ||||||
|   #  name: some name |  | ||||||
|   #  namespace: some namespace |  | ||||||
|   mountOptions: |   mountOptions: | ||||||
|     # creds can be entered into the node-stage-secret in the `mount_flags` key |     # creds can be entered into the node-stage-secret in the `mount_flags` key | ||||||
|     # the value should be: username=foo,password=bar |     # the value should be: username=foo,password=bar | ||||||
|  | @ -22,6 +19,9 @@ spec: | ||||||
|     readOnly: false |     readOnly: false | ||||||
|     fsType: cifs |     fsType: cifs | ||||||
|     volumeHandle: unique-volumeid  # make sure it's a unique id in the cluster |     volumeHandle: unique-volumeid  # make sure it's a unique id in the cluster | ||||||
|  |     #nodeStageSecretRef: | ||||||
|  |     #  name: some name | ||||||
|  |     #  namespace: some namespace | ||||||
|     volumeAttributes: |     volumeAttributes: | ||||||
|       server: host or ip |       server: host or ip | ||||||
|       share: someshare |       share: someshare | ||||||
|  |  | ||||||
|  | @ -31,6 +31,7 @@ zfs: | ||||||
|   datasetParentName: tank/k8s/test |   datasetParentName: tank/k8s/test | ||||||
|   # 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 | ||||||
|  |   # do NOT comment this option out even if you don't plan to use snapshots, just leave it with dummy value | ||||||
|   detachedSnapshotsDatasetParentName: tanks/k8s/test-snapshots |   detachedSnapshotsDatasetParentName: tanks/k8s/test-snapshots | ||||||
| 
 | 
 | ||||||
|   # "" (inherit), lz4, gzip-9, etc |   # "" (inherit), lz4, gzip-9, etc | ||||||
|  |  | ||||||
|  | @ -31,6 +31,7 @@ zfs: | ||||||
|   datasetParentName: tank/k8s/test |   datasetParentName: tank/k8s/test | ||||||
|   # 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 | ||||||
|  |   # do NOT comment this option out even if you don't plan to use snapshots, just leave it with dummy value | ||||||
|   detachedSnapshotsDatasetParentName: tanks/k8s/test-snapshots |   detachedSnapshotsDatasetParentName: tanks/k8s/test-snapshots | ||||||
| 
 | 
 | ||||||
|   datasetEnableQuotas: true |   datasetEnableQuotas: true | ||||||
|  |  | ||||||
|  | @ -32,6 +32,7 @@ zfs: | ||||||
|   datasetParentName: tank/k8s/test |   datasetParentName: tank/k8s/test | ||||||
|   # 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 | ||||||
|  |   # do NOT comment this option out even if you don't plan to use snapshots, just leave it with dummy value | ||||||
|   detachedSnapshotsDatasetParentName: tanks/k8s/test-snapshots |   detachedSnapshotsDatasetParentName: tanks/k8s/test-snapshots | ||||||
| 
 | 
 | ||||||
|   datasetEnableQuotas: true |   datasetEnableQuotas: true | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue