mirror of
https://github.com/TECHNOFAB11/zfs-localpv.git
synced 2025-12-12 06:20:11 +01:00
feat(shared): adding shared mount support ZFSPV volumes
Applications who want to share a volume can use below storageclass to make their volumes shared by multiple pods ```yaml apiVersion: storage.k8s.io/v1 kind: StorageClass metadata: name: openebs-zfspv parameters: shared: "yes" fstype: "zfs" poolname: "zfspv-pool" provisioner: zfs.csi.openebs.io ``` Now the provisioned volume using this storageclass can be used by multiple pods. Here pods have to make sure of the data consistency and have to have locking mechanism. One thing to note here is pods will be scheduled to the node where volume is present so that all the pods can use the same volume as they can access it locally only. This was we can avoid the NFS overhead and can get the optimal performance also. Also fixed the log formatting in the GRPC log. Signed-off-by: Pawan <pawan@mayadata.io>
This commit is contained in:
parent
ac9d6d5729
commit
27065bf40a
11 changed files with 2774 additions and 1339 deletions
1
changelogs/unreleased/164-pawanpraka1
Normal file
1
changelogs/unreleased/164-pawanpraka1
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
adding shared mount support ZFSPV volumes
|
||||||
|
|
@ -77,7 +77,10 @@ spec:
|
||||||
preserveUnknownFields: false
|
preserveUnknownFields: false
|
||||||
scope: Namespaced
|
scope: Namespaced
|
||||||
subresources: {}
|
subresources: {}
|
||||||
validation:
|
version: v1
|
||||||
|
versions:
|
||||||
|
- name: v1
|
||||||
|
schema:
|
||||||
openAPIV3Schema:
|
openAPIV3Schema:
|
||||||
description: ZFSVolume represents a ZFS based volume
|
description: ZFSVolume represents a ZFS based volume
|
||||||
properties:
|
properties:
|
||||||
|
|
@ -94,12 +97,13 @@ spec:
|
||||||
metadata:
|
metadata:
|
||||||
type: object
|
type: object
|
||||||
spec:
|
spec:
|
||||||
description: VolumeInfo defines ZFS volume parameters for all modes in which
|
description: VolumeInfo defines ZFS volume parameters for all modes in
|
||||||
ZFS volumes can be created like - ZFS volume with filesystem, ZFS Volume
|
which ZFS volumes can be created like - ZFS volume with filesystem,
|
||||||
exposed as zfs or ZFS volume exposed as raw block device. Some of the
|
ZFS Volume exposed as zfs or ZFS volume exposed as raw block device.
|
||||||
parameters can be only set during creation time (as specified in the details
|
Some of the parameters can be only set during creation time (as specified
|
||||||
of the parameter), and a few are editable. In case of Cloned volumes,
|
in the details of the parameter), and a few are editable. In case of
|
||||||
the parameters are assigned the same values as the source volume.
|
Cloned volumes, the parameters are assigned the same values as the source
|
||||||
|
volume.
|
||||||
properties:
|
properties:
|
||||||
capacity:
|
capacity:
|
||||||
description: Capacity of the volume
|
description: Capacity of the volume
|
||||||
|
|
@ -107,56 +111,57 @@ spec:
|
||||||
type: string
|
type: string
|
||||||
compression:
|
compression:
|
||||||
description: 'Compression specifies the block-level compression algorithm
|
description: 'Compression specifies the block-level compression algorithm
|
||||||
to be applied to the ZFS Volume. The value "on" indicates ZFS to use
|
to be applied to the ZFS Volume. The value "on" indicates ZFS to
|
||||||
the default compression algorithm. The default compression algorithm
|
use the default compression algorithm. The default compression algorithm
|
||||||
used by ZFS will be either lzjb or, if the lz4_compress feature is
|
used by ZFS will be either lzjb or, if the lz4_compress feature
|
||||||
enabled, lz4. Compression property can be edited after the volume
|
is enabled, lz4. Compression property can be edited after the volume
|
||||||
has been created. The change will only be applied to the newly-written
|
has been created. The change will only be applied to the newly-written
|
||||||
data. For instance, if the Volume was created with "off" and the next
|
data. For instance, if the Volume was created with "off" and the
|
||||||
day the compression was modified to "on", the data written prior to
|
next day the compression was modified to "on", the data written
|
||||||
setting "on" will not be compressed. Default Value: off.'
|
prior to setting "on" will not be compressed. Default Value: off.'
|
||||||
pattern: ^(on|off|lzjb|gzip|gzip-[1-9]|zle|lz4)$
|
pattern: ^(on|off|lzjb|gzip|gzip-[1-9]|zle|lz4)$
|
||||||
type: string
|
type: string
|
||||||
dedup:
|
dedup:
|
||||||
description: 'Deduplication is the process for removing redundant data
|
description: 'Deduplication is the process for removing redundant
|
||||||
at the block level, reducing the total amount of data stored. If a
|
data at the block level, reducing the total amount of data stored.
|
||||||
file system has the dedup property enabled, duplicate data blocks
|
If a file system has the dedup property enabled, duplicate data
|
||||||
are removed synchronously. The result is that only unique data is
|
blocks are removed synchronously. The result is that only unique
|
||||||
stored and common components are shared among files. Deduplication
|
data is stored and common components are shared among files. Deduplication
|
||||||
can consume significant processing power (CPU) and memory as well
|
can consume significant processing power (CPU) and memory as well
|
||||||
as generate additional disk IO. Before creating a pool with deduplication
|
as generate additional disk IO. Before creating a pool with deduplication
|
||||||
enabled, ensure that you have planned your hardware requirements appropriately
|
enabled, ensure that you have planned your hardware requirements
|
||||||
and implemented appropriate recovery practices, such as regular backups.
|
appropriately and implemented appropriate recovery practices, such
|
||||||
As an alternative to deduplication consider using compression=lz4,
|
as regular backups. As an alternative to deduplication consider
|
||||||
as a less resource-intensive alternative. should be enabled on the
|
using compression=lz4, as a less resource-intensive alternative.
|
||||||
zvol. Dedup property can be edited after the volume has been created.
|
should be enabled on the zvol. Dedup property can be edited after
|
||||||
Default Value: off.'
|
the volume has been created. Default Value: off.'
|
||||||
enum:
|
enum:
|
||||||
- "on"
|
- "on"
|
||||||
- "off"
|
- "off"
|
||||||
type: string
|
type: string
|
||||||
encryption:
|
encryption:
|
||||||
description: 'Enabling the encryption feature allows for the creation
|
description: 'Enabling the encryption feature allows for the creation
|
||||||
of encrypted filesystems and volumes. ZFS will encrypt file and zvol
|
of encrypted filesystems and volumes. ZFS will encrypt file and
|
||||||
data, file attributes, ACLs, permission bits, directory listings,
|
zvol data, file attributes, ACLs, permission bits, directory listings,
|
||||||
FUID mappings, and userused / groupused data. ZFS will not encrypt
|
FUID mappings, and userused / groupused data. ZFS will not encrypt
|
||||||
metadata related to the pool structure, including dataset and snapshot
|
metadata related to the pool structure, including dataset and snapshot
|
||||||
names, dataset hierarchy, properties, file size, file holes, and deduplication
|
names, dataset hierarchy, properties, file size, file holes, and
|
||||||
tables (though the deduplicated data itself is encrypted). Default
|
deduplication tables (though the deduplicated data itself is encrypted).
|
||||||
Value: off.'
|
Default Value: off.'
|
||||||
pattern: ^(on|off|aes-128-[c,g]cm|aes-192-[c,g]cm|aes-256-[c,g]cm)$
|
pattern: ^(on|off|aes-128-[c,g]cm|aes-192-[c,g]cm|aes-256-[c,g]cm)$
|
||||||
type: string
|
type: string
|
||||||
fsType:
|
fsType:
|
||||||
description: 'FsType specifies filesystem type for the zfs volume/dataset.
|
description: 'FsType specifies filesystem type for the zfs volume/dataset.
|
||||||
If FsType is provided as "zfs", then the driver will create a ZFS
|
If FsType is provided as "zfs", then the driver will create a ZFS
|
||||||
dataset, formatting is not required as underlying filesystem is ZFS
|
dataset, formatting is not required as underlying filesystem is
|
||||||
anyway. If FsType is ext2, ext3, ext4 or xfs, then the driver will
|
ZFS anyway. If FsType is ext2, ext3, ext4 or xfs, then the driver
|
||||||
create a ZVOL and format the volume accordingly. FsType can not be
|
will create a ZVOL and format the volume accordingly. FsType can
|
||||||
modified once volume has been provisioned. Default Value: ext4.'
|
not be modified once volume has been provisioned. Default Value:
|
||||||
|
ext4.'
|
||||||
type: string
|
type: string
|
||||||
keyformat:
|
keyformat:
|
||||||
description: KeyFormat specifies format of the encryption key The supported
|
description: KeyFormat specifies format of the encryption key The
|
||||||
KeyFormats are passphrase, raw, hex.
|
supported KeyFormats are passphrase, raw, hex.
|
||||||
enum:
|
enum:
|
||||||
- passphrase
|
- passphrase
|
||||||
- raw
|
- raw
|
||||||
|
|
@ -166,9 +171,9 @@ spec:
|
||||||
description: KeyLocation is the location of key for the encryption
|
description: KeyLocation is the location of key for the encryption
|
||||||
type: string
|
type: string
|
||||||
ownerNodeID:
|
ownerNodeID:
|
||||||
description: OwnerNodeID is the Node ID where the ZPOOL is running which
|
description: OwnerNodeID is the Node ID where the ZPOOL is running
|
||||||
is where the volume has been provisioned. OwnerNodeID can not be edited
|
which is where the volume has been provisioned. OwnerNodeID can
|
||||||
after the volume has been provisioned.
|
not be edited after the volume has been provisioned.
|
||||||
minLength: 1
|
minLength: 1
|
||||||
type: string
|
type: string
|
||||||
poolName:
|
poolName:
|
||||||
|
|
@ -186,28 +191,36 @@ spec:
|
||||||
files are unaffected. Default Value: 128k.'
|
files are unaffected. Default Value: 128k.'
|
||||||
minLength: 1
|
minLength: 1
|
||||||
type: string
|
type: string
|
||||||
|
shared:
|
||||||
|
description: Shared specifies whether the volume can be shared among
|
||||||
|
multiple pods. If it is not set to "yes", then the ZFS-LocalPV Driver
|
||||||
|
will not allow the volumes to be mounted by more than one pods.
|
||||||
|
enum:
|
||||||
|
- "yes"
|
||||||
|
- "no"
|
||||||
|
type: string
|
||||||
snapname:
|
snapname:
|
||||||
description: SnapName specifies the name of the snapshot where the volume
|
description: SnapName specifies the name of the snapshot where the
|
||||||
has been cloned from. Snapname can not be edited after the volume
|
volume has been cloned from. Snapname can not be edited after the
|
||||||
has been provisioned.
|
volume has been provisioned.
|
||||||
type: string
|
type: string
|
||||||
thinProvision:
|
thinProvision:
|
||||||
description: 'ThinProvision describes whether space reservation for
|
description: 'ThinProvision describes whether space reservation for
|
||||||
the source volume is required or not. The value "yes" indicates that
|
the source volume is required or not. The value "yes" indicates
|
||||||
volume should be thin provisioned and "no" means thick provisioning
|
that volume should be thin provisioned and "no" means thick provisioning
|
||||||
of the volume. If thinProvision is set to "yes" then volume can be
|
of the volume. If thinProvision is set to "yes" then volume can
|
||||||
provisioned even if the ZPOOL does not have the enough capacity. If
|
be provisioned even if the ZPOOL does not have the enough capacity.
|
||||||
thinProvision is set to "no" then volume can be provisioned only if
|
If thinProvision is set to "no" then volume can be provisioned only
|
||||||
the ZPOOL has enough capacity and capacity required by volume can
|
if the ZPOOL has enough capacity and capacity required by volume
|
||||||
be reserved. ThinProvision can not be modified once volume has been
|
can be reserved. ThinProvision can not be modified once volume has
|
||||||
provisioned. Default Value: no.'
|
been provisioned. Default Value: no.'
|
||||||
enum:
|
enum:
|
||||||
- "yes"
|
- "yes"
|
||||||
- "no"
|
- "no"
|
||||||
type: string
|
type: string
|
||||||
volblocksize:
|
volblocksize:
|
||||||
description: 'VolBlockSize specifies the block size for the zvol. The
|
description: 'VolBlockSize specifies the block size for the zvol.
|
||||||
volsize can only be set to a multiple of volblocksize, and cannot
|
The volsize can only be set to a multiple of volblocksize, and cannot
|
||||||
be zero. VolBlockSize can not be edited after the volume has been
|
be zero. VolBlockSize can not be edited after the volume has been
|
||||||
provisioned. Default Value: 8k.'
|
provisioned. Default Value: 8k.'
|
||||||
minLength: 1
|
minLength: 1
|
||||||
|
|
@ -245,12 +258,179 @@ spec:
|
||||||
required:
|
required:
|
||||||
- spec
|
- spec
|
||||||
type: object
|
type: object
|
||||||
version: v1
|
|
||||||
versions:
|
|
||||||
- name: v1
|
|
||||||
served: true
|
served: true
|
||||||
storage: true
|
storage: true
|
||||||
- name: v1alpha1
|
- name: v1alpha1
|
||||||
|
schema:
|
||||||
|
openAPIV3Schema:
|
||||||
|
description: ZFSVolume represents a ZFS based volume
|
||||||
|
properties:
|
||||||
|
apiVersion:
|
||||||
|
description: 'APIVersion defines the versioned schema of this representation
|
||||||
|
of an object. Servers should convert recognized schemas to the latest
|
||||||
|
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources'
|
||||||
|
type: string
|
||||||
|
kind:
|
||||||
|
description: 'Kind is a string value representing the REST resource this
|
||||||
|
object represents. Servers may infer this from the endpoint the client
|
||||||
|
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds'
|
||||||
|
type: string
|
||||||
|
metadata:
|
||||||
|
type: object
|
||||||
|
spec:
|
||||||
|
description: VolumeInfo defines ZFS volume parameters for all modes in
|
||||||
|
which ZFS volumes can be created like - ZFS volume with filesystem,
|
||||||
|
ZFS Volume exposed as zfs or ZFS volume exposed as raw block device.
|
||||||
|
Some of the parameters can be only set during creation time (as specified
|
||||||
|
in the details of the parameter), and a few are editable. In case of
|
||||||
|
Cloned volumes, the parameters are assigned the same values as the source
|
||||||
|
volume.
|
||||||
|
properties:
|
||||||
|
capacity:
|
||||||
|
description: Capacity of the volume
|
||||||
|
minLength: 1
|
||||||
|
type: string
|
||||||
|
compression:
|
||||||
|
description: 'Compression specifies the block-level compression algorithm
|
||||||
|
to be applied to the ZFS Volume. The value "on" indicates ZFS to
|
||||||
|
use the default compression algorithm. The default compression algorithm
|
||||||
|
used by ZFS will be either lzjb or, if the lz4_compress feature
|
||||||
|
is enabled, lz4. Compression property can be edited after the volume
|
||||||
|
has been created. The change will only be applied to the newly-written
|
||||||
|
data. For instance, if the Volume was created with "off" and the
|
||||||
|
next day the compression was modified to "on", the data written
|
||||||
|
prior to setting "on" will not be compressed. Default Value: off.'
|
||||||
|
pattern: ^(on|off|lzjb|gzip|gzip-[1-9]|zle|lz4)$
|
||||||
|
type: string
|
||||||
|
dedup:
|
||||||
|
description: 'Deduplication is the process for removing redundant
|
||||||
|
data at the block level, reducing the total amount of data stored.
|
||||||
|
If a file system has the dedup property enabled, duplicate data
|
||||||
|
blocks are removed synchronously. The result is that only unique
|
||||||
|
data is stored and common components are shared among files. Deduplication
|
||||||
|
can consume significant processing power (CPU) and memory as well
|
||||||
|
as generate additional disk IO. Before creating a pool with deduplication
|
||||||
|
enabled, ensure that you have planned your hardware requirements
|
||||||
|
appropriately and implemented appropriate recovery practices, such
|
||||||
|
as regular backups. As an alternative to deduplication consider
|
||||||
|
using compression=lz4, as a less resource-intensive alternative.
|
||||||
|
should be enabled on the zvol. Dedup property can be edited after
|
||||||
|
the volume has been created. Default Value: off.'
|
||||||
|
enum:
|
||||||
|
- "on"
|
||||||
|
- "off"
|
||||||
|
type: string
|
||||||
|
encryption:
|
||||||
|
description: 'Enabling the encryption feature allows for the creation
|
||||||
|
of encrypted filesystems and volumes. ZFS will encrypt file and
|
||||||
|
zvol data, file attributes, ACLs, permission bits, directory listings,
|
||||||
|
FUID mappings, and userused / groupused data. ZFS will not encrypt
|
||||||
|
metadata related to the pool structure, including dataset and snapshot
|
||||||
|
names, dataset hierarchy, properties, file size, file holes, and
|
||||||
|
deduplication tables (though the deduplicated data itself is encrypted).
|
||||||
|
Default Value: off.'
|
||||||
|
pattern: ^(on|off|aes-128-[c,g]cm|aes-192-[c,g]cm|aes-256-[c,g]cm)$
|
||||||
|
type: string
|
||||||
|
fsType:
|
||||||
|
description: 'FsType specifies filesystem type for the zfs volume/dataset.
|
||||||
|
If FsType is provided as "zfs", then the driver will create a ZFS
|
||||||
|
dataset, formatting is not required as underlying filesystem is
|
||||||
|
ZFS anyway. If FsType is ext2, ext3, ext4 or xfs, then the driver
|
||||||
|
will create a ZVOL and format the volume accordingly. FsType can
|
||||||
|
not be modified once volume has been provisioned. Default Value:
|
||||||
|
ext4.'
|
||||||
|
type: string
|
||||||
|
keyformat:
|
||||||
|
description: KeyFormat specifies format of the encryption key The
|
||||||
|
supported KeyFormats are passphrase, raw, hex.
|
||||||
|
enum:
|
||||||
|
- passphrase
|
||||||
|
- raw
|
||||||
|
- hex
|
||||||
|
type: string
|
||||||
|
keylocation:
|
||||||
|
description: KeyLocation is the location of key for the encryption
|
||||||
|
type: string
|
||||||
|
ownerNodeID:
|
||||||
|
description: OwnerNodeID is the Node ID where the ZPOOL is running
|
||||||
|
which is where the volume has been provisioned. OwnerNodeID can
|
||||||
|
not be edited after the volume has been provisioned.
|
||||||
|
minLength: 1
|
||||||
|
type: string
|
||||||
|
poolName:
|
||||||
|
description: poolName specifies the name of the pool where the volume
|
||||||
|
has been created. PoolName can not be edited after the volume has
|
||||||
|
been provisioned.
|
||||||
|
minLength: 1
|
||||||
|
type: string
|
||||||
|
recordsize:
|
||||||
|
description: 'Specifies a suggested block size for files in the file
|
||||||
|
system. The size specified must be a power of two greater than or
|
||||||
|
equal to 512 and less than or equal to 128 Kbytes. RecordSize property
|
||||||
|
can be edited after the volume has been created. Changing the file
|
||||||
|
system''s recordsize affects only files created afterward; existing
|
||||||
|
files are unaffected. Default Value: 128k.'
|
||||||
|
minLength: 1
|
||||||
|
type: string
|
||||||
|
snapname:
|
||||||
|
description: SnapName specifies the name of the snapshot where the
|
||||||
|
volume has been cloned from. Snapname can not be edited after the
|
||||||
|
volume has been provisioned.
|
||||||
|
type: string
|
||||||
|
thinProvision:
|
||||||
|
description: 'ThinProvision describes whether space reservation for
|
||||||
|
the source volume is required or not. The value "yes" indicates
|
||||||
|
that volume should be thin provisioned and "no" means thick provisioning
|
||||||
|
of the volume. If thinProvision is set to "yes" then volume can
|
||||||
|
be provisioned even if the ZPOOL does not have the enough capacity.
|
||||||
|
If thinProvision is set to "no" then volume can be provisioned only
|
||||||
|
if the ZPOOL has enough capacity and capacity required by volume
|
||||||
|
can be reserved. ThinProvision can not be modified once volume has
|
||||||
|
been provisioned. Default Value: no.'
|
||||||
|
enum:
|
||||||
|
- "yes"
|
||||||
|
- "no"
|
||||||
|
type: string
|
||||||
|
volblocksize:
|
||||||
|
description: 'VolBlockSize specifies the block size for the zvol.
|
||||||
|
The volsize can only be set to a multiple of volblocksize, and cannot
|
||||||
|
be zero. VolBlockSize can not be edited after the volume has been
|
||||||
|
provisioned. Default Value: 8k.'
|
||||||
|
minLength: 1
|
||||||
|
type: string
|
||||||
|
volumeType:
|
||||||
|
description: volumeType determines whether the volume is of type "DATASET"
|
||||||
|
or "ZVOL". If fstype provided in the storageclass is "zfs", a volume
|
||||||
|
of type dataset will be created. If "ext4", "ext3", "ext2" or "xfs"
|
||||||
|
is mentioned as fstype in the storageclass, then a volume of type
|
||||||
|
zvol will be created, which will be further formatted as the fstype
|
||||||
|
provided in the storageclass. VolumeType can not be modified once
|
||||||
|
volume has been provisioned.
|
||||||
|
enum:
|
||||||
|
- ZVOL
|
||||||
|
- DATASET
|
||||||
|
type: string
|
||||||
|
required:
|
||||||
|
- capacity
|
||||||
|
- ownerNodeID
|
||||||
|
- poolName
|
||||||
|
- volumeType
|
||||||
|
type: object
|
||||||
|
status:
|
||||||
|
properties:
|
||||||
|
state:
|
||||||
|
description: State specifies the current state of the volume provisioning
|
||||||
|
request. The state "Pending" means that the volume creation request
|
||||||
|
has not processed yet. The state "Ready" means that the volume has
|
||||||
|
been created and it is ready for the use.
|
||||||
|
enum:
|
||||||
|
- Pending
|
||||||
|
- Ready
|
||||||
|
type: string
|
||||||
|
type: object
|
||||||
|
required:
|
||||||
|
- spec
|
||||||
|
type: object
|
||||||
served: true
|
served: true
|
||||||
storage: false
|
storage: false
|
||||||
status:
|
status:
|
||||||
|
|
@ -290,7 +470,10 @@ spec:
|
||||||
singular: zfssnapshot
|
singular: zfssnapshot
|
||||||
preserveUnknownFields: false
|
preserveUnknownFields: false
|
||||||
scope: Namespaced
|
scope: Namespaced
|
||||||
validation:
|
version: v1
|
||||||
|
versions:
|
||||||
|
- name: v1
|
||||||
|
schema:
|
||||||
openAPIV3Schema:
|
openAPIV3Schema:
|
||||||
description: ZFSSnapshot represents a ZFS Snapshot of the zfsvolume
|
description: ZFSSnapshot represents a ZFS Snapshot of the zfsvolume
|
||||||
properties:
|
properties:
|
||||||
|
|
@ -307,12 +490,13 @@ spec:
|
||||||
metadata:
|
metadata:
|
||||||
type: object
|
type: object
|
||||||
spec:
|
spec:
|
||||||
description: VolumeInfo defines ZFS volume parameters for all modes in which
|
description: VolumeInfo defines ZFS volume parameters for all modes in
|
||||||
ZFS volumes can be created like - ZFS volume with filesystem, ZFS Volume
|
which ZFS volumes can be created like - ZFS volume with filesystem,
|
||||||
exposed as zfs or ZFS volume exposed as raw block device. Some of the
|
ZFS Volume exposed as zfs or ZFS volume exposed as raw block device.
|
||||||
parameters can be only set during creation time (as specified in the details
|
Some of the parameters can be only set during creation time (as specified
|
||||||
of the parameter), and a few are editable. In case of Cloned volumes,
|
in the details of the parameter), and a few are editable. In case of
|
||||||
the parameters are assigned the same values as the source volume.
|
Cloned volumes, the parameters are assigned the same values as the source
|
||||||
|
volume.
|
||||||
properties:
|
properties:
|
||||||
capacity:
|
capacity:
|
||||||
description: Capacity of the volume
|
description: Capacity of the volume
|
||||||
|
|
@ -320,56 +504,57 @@ spec:
|
||||||
type: string
|
type: string
|
||||||
compression:
|
compression:
|
||||||
description: 'Compression specifies the block-level compression algorithm
|
description: 'Compression specifies the block-level compression algorithm
|
||||||
to be applied to the ZFS Volume. The value "on" indicates ZFS to use
|
to be applied to the ZFS Volume. The value "on" indicates ZFS to
|
||||||
the default compression algorithm. The default compression algorithm
|
use the default compression algorithm. The default compression algorithm
|
||||||
used by ZFS will be either lzjb or, if the lz4_compress feature is
|
used by ZFS will be either lzjb or, if the lz4_compress feature
|
||||||
enabled, lz4. Compression property can be edited after the volume
|
is enabled, lz4. Compression property can be edited after the volume
|
||||||
has been created. The change will only be applied to the newly-written
|
has been created. The change will only be applied to the newly-written
|
||||||
data. For instance, if the Volume was created with "off" and the next
|
data. For instance, if the Volume was created with "off" and the
|
||||||
day the compression was modified to "on", the data written prior to
|
next day the compression was modified to "on", the data written
|
||||||
setting "on" will not be compressed. Default Value: off.'
|
prior to setting "on" will not be compressed. Default Value: off.'
|
||||||
pattern: ^(on|off|lzjb|gzip|gzip-[1-9]|zle|lz4)$
|
pattern: ^(on|off|lzjb|gzip|gzip-[1-9]|zle|lz4)$
|
||||||
type: string
|
type: string
|
||||||
dedup:
|
dedup:
|
||||||
description: 'Deduplication is the process for removing redundant data
|
description: 'Deduplication is the process for removing redundant
|
||||||
at the block level, reducing the total amount of data stored. If a
|
data at the block level, reducing the total amount of data stored.
|
||||||
file system has the dedup property enabled, duplicate data blocks
|
If a file system has the dedup property enabled, duplicate data
|
||||||
are removed synchronously. The result is that only unique data is
|
blocks are removed synchronously. The result is that only unique
|
||||||
stored and common components are shared among files. Deduplication
|
data is stored and common components are shared among files. Deduplication
|
||||||
can consume significant processing power (CPU) and memory as well
|
can consume significant processing power (CPU) and memory as well
|
||||||
as generate additional disk IO. Before creating a pool with deduplication
|
as generate additional disk IO. Before creating a pool with deduplication
|
||||||
enabled, ensure that you have planned your hardware requirements appropriately
|
enabled, ensure that you have planned your hardware requirements
|
||||||
and implemented appropriate recovery practices, such as regular backups.
|
appropriately and implemented appropriate recovery practices, such
|
||||||
As an alternative to deduplication consider using compression=lz4,
|
as regular backups. As an alternative to deduplication consider
|
||||||
as a less resource-intensive alternative. should be enabled on the
|
using compression=lz4, as a less resource-intensive alternative.
|
||||||
zvol. Dedup property can be edited after the volume has been created.
|
should be enabled on the zvol. Dedup property can be edited after
|
||||||
Default Value: off.'
|
the volume has been created. Default Value: off.'
|
||||||
enum:
|
enum:
|
||||||
- "on"
|
- "on"
|
||||||
- "off"
|
- "off"
|
||||||
type: string
|
type: string
|
||||||
encryption:
|
encryption:
|
||||||
description: 'Enabling the encryption feature allows for the creation
|
description: 'Enabling the encryption feature allows for the creation
|
||||||
of encrypted filesystems and volumes. ZFS will encrypt file and zvol
|
of encrypted filesystems and volumes. ZFS will encrypt file and
|
||||||
data, file attributes, ACLs, permission bits, directory listings,
|
zvol data, file attributes, ACLs, permission bits, directory listings,
|
||||||
FUID mappings, and userused / groupused data. ZFS will not encrypt
|
FUID mappings, and userused / groupused data. ZFS will not encrypt
|
||||||
metadata related to the pool structure, including dataset and snapshot
|
metadata related to the pool structure, including dataset and snapshot
|
||||||
names, dataset hierarchy, properties, file size, file holes, and deduplication
|
names, dataset hierarchy, properties, file size, file holes, and
|
||||||
tables (though the deduplicated data itself is encrypted). Default
|
deduplication tables (though the deduplicated data itself is encrypted).
|
||||||
Value: off.'
|
Default Value: off.'
|
||||||
pattern: ^(on|off|aes-128-[c,g]cm|aes-192-[c,g]cm|aes-256-[c,g]cm)$
|
pattern: ^(on|off|aes-128-[c,g]cm|aes-192-[c,g]cm|aes-256-[c,g]cm)$
|
||||||
type: string
|
type: string
|
||||||
fsType:
|
fsType:
|
||||||
description: 'FsType specifies filesystem type for the zfs volume/dataset.
|
description: 'FsType specifies filesystem type for the zfs volume/dataset.
|
||||||
If FsType is provided as "zfs", then the driver will create a ZFS
|
If FsType is provided as "zfs", then the driver will create a ZFS
|
||||||
dataset, formatting is not required as underlying filesystem is ZFS
|
dataset, formatting is not required as underlying filesystem is
|
||||||
anyway. If FsType is ext2, ext3, ext4 or xfs, then the driver will
|
ZFS anyway. If FsType is ext2, ext3, ext4 or xfs, then the driver
|
||||||
create a ZVOL and format the volume accordingly. FsType can not be
|
will create a ZVOL and format the volume accordingly. FsType can
|
||||||
modified once volume has been provisioned. Default Value: ext4.'
|
not be modified once volume has been provisioned. Default Value:
|
||||||
|
ext4.'
|
||||||
type: string
|
type: string
|
||||||
keyformat:
|
keyformat:
|
||||||
description: KeyFormat specifies format of the encryption key The supported
|
description: KeyFormat specifies format of the encryption key The
|
||||||
KeyFormats are passphrase, raw, hex.
|
supported KeyFormats are passphrase, raw, hex.
|
||||||
enum:
|
enum:
|
||||||
- passphrase
|
- passphrase
|
||||||
- raw
|
- raw
|
||||||
|
|
@ -379,9 +564,9 @@ spec:
|
||||||
description: KeyLocation is the location of key for the encryption
|
description: KeyLocation is the location of key for the encryption
|
||||||
type: string
|
type: string
|
||||||
ownerNodeID:
|
ownerNodeID:
|
||||||
description: OwnerNodeID is the Node ID where the ZPOOL is running which
|
description: OwnerNodeID is the Node ID where the ZPOOL is running
|
||||||
is where the volume has been provisioned. OwnerNodeID can not be edited
|
which is where the volume has been provisioned. OwnerNodeID can
|
||||||
after the volume has been provisioned.
|
not be edited after the volume has been provisioned.
|
||||||
minLength: 1
|
minLength: 1
|
||||||
type: string
|
type: string
|
||||||
poolName:
|
poolName:
|
||||||
|
|
@ -399,28 +584,36 @@ spec:
|
||||||
files are unaffected. Default Value: 128k.'
|
files are unaffected. Default Value: 128k.'
|
||||||
minLength: 1
|
minLength: 1
|
||||||
type: string
|
type: string
|
||||||
|
shared:
|
||||||
|
description: Shared specifies whether the volume can be shared among
|
||||||
|
multiple pods. If it is not set to "yes", then the ZFS-LocalPV Driver
|
||||||
|
will not allow the volumes to be mounted by more than one pods.
|
||||||
|
enum:
|
||||||
|
- "yes"
|
||||||
|
- "no"
|
||||||
|
type: string
|
||||||
snapname:
|
snapname:
|
||||||
description: SnapName specifies the name of the snapshot where the volume
|
description: SnapName specifies the name of the snapshot where the
|
||||||
has been cloned from. Snapname can not be edited after the volume
|
volume has been cloned from. Snapname can not be edited after the
|
||||||
has been provisioned.
|
volume has been provisioned.
|
||||||
type: string
|
type: string
|
||||||
thinProvision:
|
thinProvision:
|
||||||
description: 'ThinProvision describes whether space reservation for
|
description: 'ThinProvision describes whether space reservation for
|
||||||
the source volume is required or not. The value "yes" indicates that
|
the source volume is required or not. The value "yes" indicates
|
||||||
volume should be thin provisioned and "no" means thick provisioning
|
that volume should be thin provisioned and "no" means thick provisioning
|
||||||
of the volume. If thinProvision is set to "yes" then volume can be
|
of the volume. If thinProvision is set to "yes" then volume can
|
||||||
provisioned even if the ZPOOL does not have the enough capacity. If
|
be provisioned even if the ZPOOL does not have the enough capacity.
|
||||||
thinProvision is set to "no" then volume can be provisioned only if
|
If thinProvision is set to "no" then volume can be provisioned only
|
||||||
the ZPOOL has enough capacity and capacity required by volume can
|
if the ZPOOL has enough capacity and capacity required by volume
|
||||||
be reserved. ThinProvision can not be modified once volume has been
|
can be reserved. ThinProvision can not be modified once volume has
|
||||||
provisioned. Default Value: no.'
|
been provisioned. Default Value: no.'
|
||||||
enum:
|
enum:
|
||||||
- "yes"
|
- "yes"
|
||||||
- "no"
|
- "no"
|
||||||
type: string
|
type: string
|
||||||
volblocksize:
|
volblocksize:
|
||||||
description: 'VolBlockSize specifies the block size for the zvol. The
|
description: 'VolBlockSize specifies the block size for the zvol.
|
||||||
volsize can only be set to a multiple of volblocksize, and cannot
|
The volsize can only be set to a multiple of volblocksize, and cannot
|
||||||
be zero. VolBlockSize can not be edited after the volume has been
|
be zero. VolBlockSize can not be edited after the volume has been
|
||||||
provisioned. Default Value: 8k.'
|
provisioned. Default Value: 8k.'
|
||||||
minLength: 1
|
minLength: 1
|
||||||
|
|
@ -452,12 +645,173 @@ spec:
|
||||||
- spec
|
- spec
|
||||||
- status
|
- status
|
||||||
type: object
|
type: object
|
||||||
version: v1
|
|
||||||
versions:
|
|
||||||
- name: v1
|
|
||||||
served: true
|
served: true
|
||||||
storage: true
|
storage: true
|
||||||
- name: v1alpha1
|
- name: v1alpha1
|
||||||
|
schema:
|
||||||
|
openAPIV3Schema:
|
||||||
|
description: ZFSSnapshot represents a ZFS Snapshot of the zfsvolume
|
||||||
|
properties:
|
||||||
|
apiVersion:
|
||||||
|
description: 'APIVersion defines the versioned schema of this representation
|
||||||
|
of an object. Servers should convert recognized schemas to the latest
|
||||||
|
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources'
|
||||||
|
type: string
|
||||||
|
kind:
|
||||||
|
description: 'Kind is a string value representing the REST resource this
|
||||||
|
object represents. Servers may infer this from the endpoint the client
|
||||||
|
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds'
|
||||||
|
type: string
|
||||||
|
metadata:
|
||||||
|
type: object
|
||||||
|
spec:
|
||||||
|
description: VolumeInfo defines ZFS volume parameters for all modes in
|
||||||
|
which ZFS volumes can be created like - ZFS volume with filesystem,
|
||||||
|
ZFS Volume exposed as zfs or ZFS volume exposed as raw block device.
|
||||||
|
Some of the parameters can be only set during creation time (as specified
|
||||||
|
in the details of the parameter), and a few are editable. In case of
|
||||||
|
Cloned volumes, the parameters are assigned the same values as the source
|
||||||
|
volume.
|
||||||
|
properties:
|
||||||
|
capacity:
|
||||||
|
description: Capacity of the volume
|
||||||
|
minLength: 1
|
||||||
|
type: string
|
||||||
|
compression:
|
||||||
|
description: 'Compression specifies the block-level compression algorithm
|
||||||
|
to be applied to the ZFS Volume. The value "on" indicates ZFS to
|
||||||
|
use the default compression algorithm. The default compression algorithm
|
||||||
|
used by ZFS will be either lzjb or, if the lz4_compress feature
|
||||||
|
is enabled, lz4. Compression property can be edited after the volume
|
||||||
|
has been created. The change will only be applied to the newly-written
|
||||||
|
data. For instance, if the Volume was created with "off" and the
|
||||||
|
next day the compression was modified to "on", the data written
|
||||||
|
prior to setting "on" will not be compressed. Default Value: off.'
|
||||||
|
pattern: ^(on|off|lzjb|gzip|gzip-[1-9]|zle|lz4)$
|
||||||
|
type: string
|
||||||
|
dedup:
|
||||||
|
description: 'Deduplication is the process for removing redundant
|
||||||
|
data at the block level, reducing the total amount of data stored.
|
||||||
|
If a file system has the dedup property enabled, duplicate data
|
||||||
|
blocks are removed synchronously. The result is that only unique
|
||||||
|
data is stored and common components are shared among files. Deduplication
|
||||||
|
can consume significant processing power (CPU) and memory as well
|
||||||
|
as generate additional disk IO. Before creating a pool with deduplication
|
||||||
|
enabled, ensure that you have planned your hardware requirements
|
||||||
|
appropriately and implemented appropriate recovery practices, such
|
||||||
|
as regular backups. As an alternative to deduplication consider
|
||||||
|
using compression=lz4, as a less resource-intensive alternative.
|
||||||
|
should be enabled on the zvol. Dedup property can be edited after
|
||||||
|
the volume has been created. Default Value: off.'
|
||||||
|
enum:
|
||||||
|
- "on"
|
||||||
|
- "off"
|
||||||
|
type: string
|
||||||
|
encryption:
|
||||||
|
description: 'Enabling the encryption feature allows for the creation
|
||||||
|
of encrypted filesystems and volumes. ZFS will encrypt file and
|
||||||
|
zvol data, file attributes, ACLs, permission bits, directory listings,
|
||||||
|
FUID mappings, and userused / groupused data. ZFS will not encrypt
|
||||||
|
metadata related to the pool structure, including dataset and snapshot
|
||||||
|
names, dataset hierarchy, properties, file size, file holes, and
|
||||||
|
deduplication tables (though the deduplicated data itself is encrypted).
|
||||||
|
Default Value: off.'
|
||||||
|
pattern: ^(on|off|aes-128-[c,g]cm|aes-192-[c,g]cm|aes-256-[c,g]cm)$
|
||||||
|
type: string
|
||||||
|
fsType:
|
||||||
|
description: 'FsType specifies filesystem type for the zfs volume/dataset.
|
||||||
|
If FsType is provided as "zfs", then the driver will create a ZFS
|
||||||
|
dataset, formatting is not required as underlying filesystem is
|
||||||
|
ZFS anyway. If FsType is ext2, ext3, ext4 or xfs, then the driver
|
||||||
|
will create a ZVOL and format the volume accordingly. FsType can
|
||||||
|
not be modified once volume has been provisioned. Default Value:
|
||||||
|
ext4.'
|
||||||
|
type: string
|
||||||
|
keyformat:
|
||||||
|
description: KeyFormat specifies format of the encryption key The
|
||||||
|
supported KeyFormats are passphrase, raw, hex.
|
||||||
|
enum:
|
||||||
|
- passphrase
|
||||||
|
- raw
|
||||||
|
- hex
|
||||||
|
type: string
|
||||||
|
keylocation:
|
||||||
|
description: KeyLocation is the location of key for the encryption
|
||||||
|
type: string
|
||||||
|
ownerNodeID:
|
||||||
|
description: OwnerNodeID is the Node ID where the ZPOOL is running
|
||||||
|
which is where the volume has been provisioned. OwnerNodeID can
|
||||||
|
not be edited after the volume has been provisioned.
|
||||||
|
minLength: 1
|
||||||
|
type: string
|
||||||
|
poolName:
|
||||||
|
description: poolName specifies the name of the pool where the volume
|
||||||
|
has been created. PoolName can not be edited after the volume has
|
||||||
|
been provisioned.
|
||||||
|
minLength: 1
|
||||||
|
type: string
|
||||||
|
recordsize:
|
||||||
|
description: 'Specifies a suggested block size for files in the file
|
||||||
|
system. The size specified must be a power of two greater than or
|
||||||
|
equal to 512 and less than or equal to 128 Kbytes. RecordSize property
|
||||||
|
can be edited after the volume has been created. Changing the file
|
||||||
|
system''s recordsize affects only files created afterward; existing
|
||||||
|
files are unaffected. Default Value: 128k.'
|
||||||
|
minLength: 1
|
||||||
|
type: string
|
||||||
|
snapname:
|
||||||
|
description: SnapName specifies the name of the snapshot where the
|
||||||
|
volume has been cloned from. Snapname can not be edited after the
|
||||||
|
volume has been provisioned.
|
||||||
|
type: string
|
||||||
|
thinProvision:
|
||||||
|
description: 'ThinProvision describes whether space reservation for
|
||||||
|
the source volume is required or not. The value "yes" indicates
|
||||||
|
that volume should be thin provisioned and "no" means thick provisioning
|
||||||
|
of the volume. If thinProvision is set to "yes" then volume can
|
||||||
|
be provisioned even if the ZPOOL does not have the enough capacity.
|
||||||
|
If thinProvision is set to "no" then volume can be provisioned only
|
||||||
|
if the ZPOOL has enough capacity and capacity required by volume
|
||||||
|
can be reserved. ThinProvision can not be modified once volume has
|
||||||
|
been provisioned. Default Value: no.'
|
||||||
|
enum:
|
||||||
|
- "yes"
|
||||||
|
- "no"
|
||||||
|
type: string
|
||||||
|
volblocksize:
|
||||||
|
description: 'VolBlockSize specifies the block size for the zvol.
|
||||||
|
The volsize can only be set to a multiple of volblocksize, and cannot
|
||||||
|
be zero. VolBlockSize can not be edited after the volume has been
|
||||||
|
provisioned. Default Value: 8k.'
|
||||||
|
minLength: 1
|
||||||
|
type: string
|
||||||
|
volumeType:
|
||||||
|
description: volumeType determines whether the volume is of type "DATASET"
|
||||||
|
or "ZVOL". If fstype provided in the storageclass is "zfs", a volume
|
||||||
|
of type dataset will be created. If "ext4", "ext3", "ext2" or "xfs"
|
||||||
|
is mentioned as fstype in the storageclass, then a volume of type
|
||||||
|
zvol will be created, which will be further formatted as the fstype
|
||||||
|
provided in the storageclass. VolumeType can not be modified once
|
||||||
|
volume has been provisioned.
|
||||||
|
enum:
|
||||||
|
- ZVOL
|
||||||
|
- DATASET
|
||||||
|
type: string
|
||||||
|
required:
|
||||||
|
- capacity
|
||||||
|
- ownerNodeID
|
||||||
|
- poolName
|
||||||
|
- volumeType
|
||||||
|
type: object
|
||||||
|
status:
|
||||||
|
properties:
|
||||||
|
state:
|
||||||
|
type: string
|
||||||
|
type: object
|
||||||
|
required:
|
||||||
|
- spec
|
||||||
|
- status
|
||||||
|
type: object
|
||||||
served: true
|
served: true
|
||||||
storage: false
|
storage: false
|
||||||
status:
|
status:
|
||||||
|
|
|
||||||
|
|
@ -77,7 +77,10 @@ spec:
|
||||||
preserveUnknownFields: false
|
preserveUnknownFields: false
|
||||||
scope: Namespaced
|
scope: Namespaced
|
||||||
subresources: {}
|
subresources: {}
|
||||||
validation:
|
version: v1
|
||||||
|
versions:
|
||||||
|
- name: v1
|
||||||
|
schema:
|
||||||
openAPIV3Schema:
|
openAPIV3Schema:
|
||||||
description: ZFSVolume represents a ZFS based volume
|
description: ZFSVolume represents a ZFS based volume
|
||||||
properties:
|
properties:
|
||||||
|
|
@ -94,12 +97,13 @@ spec:
|
||||||
metadata:
|
metadata:
|
||||||
type: object
|
type: object
|
||||||
spec:
|
spec:
|
||||||
description: VolumeInfo defines ZFS volume parameters for all modes in which
|
description: VolumeInfo defines ZFS volume parameters for all modes in
|
||||||
ZFS volumes can be created like - ZFS volume with filesystem, ZFS Volume
|
which ZFS volumes can be created like - ZFS volume with filesystem,
|
||||||
exposed as zfs or ZFS volume exposed as raw block device. Some of the
|
ZFS Volume exposed as zfs or ZFS volume exposed as raw block device.
|
||||||
parameters can be only set during creation time (as specified in the details
|
Some of the parameters can be only set during creation time (as specified
|
||||||
of the parameter), and a few are editable. In case of Cloned volumes,
|
in the details of the parameter), and a few are editable. In case of
|
||||||
the parameters are assigned the same values as the source volume.
|
Cloned volumes, the parameters are assigned the same values as the source
|
||||||
|
volume.
|
||||||
properties:
|
properties:
|
||||||
capacity:
|
capacity:
|
||||||
description: Capacity of the volume
|
description: Capacity of the volume
|
||||||
|
|
@ -107,56 +111,57 @@ spec:
|
||||||
type: string
|
type: string
|
||||||
compression:
|
compression:
|
||||||
description: 'Compression specifies the block-level compression algorithm
|
description: 'Compression specifies the block-level compression algorithm
|
||||||
to be applied to the ZFS Volume. The value "on" indicates ZFS to use
|
to be applied to the ZFS Volume. The value "on" indicates ZFS to
|
||||||
the default compression algorithm. The default compression algorithm
|
use the default compression algorithm. The default compression algorithm
|
||||||
used by ZFS will be either lzjb or, if the lz4_compress feature is
|
used by ZFS will be either lzjb or, if the lz4_compress feature
|
||||||
enabled, lz4. Compression property can be edited after the volume
|
is enabled, lz4. Compression property can be edited after the volume
|
||||||
has been created. The change will only be applied to the newly-written
|
has been created. The change will only be applied to the newly-written
|
||||||
data. For instance, if the Volume was created with "off" and the next
|
data. For instance, if the Volume was created with "off" and the
|
||||||
day the compression was modified to "on", the data written prior to
|
next day the compression was modified to "on", the data written
|
||||||
setting "on" will not be compressed. Default Value: off.'
|
prior to setting "on" will not be compressed. Default Value: off.'
|
||||||
pattern: ^(on|off|lzjb|gzip|gzip-[1-9]|zle|lz4)$
|
pattern: ^(on|off|lzjb|gzip|gzip-[1-9]|zle|lz4)$
|
||||||
type: string
|
type: string
|
||||||
dedup:
|
dedup:
|
||||||
description: 'Deduplication is the process for removing redundant data
|
description: 'Deduplication is the process for removing redundant
|
||||||
at the block level, reducing the total amount of data stored. If a
|
data at the block level, reducing the total amount of data stored.
|
||||||
file system has the dedup property enabled, duplicate data blocks
|
If a file system has the dedup property enabled, duplicate data
|
||||||
are removed synchronously. The result is that only unique data is
|
blocks are removed synchronously. The result is that only unique
|
||||||
stored and common components are shared among files. Deduplication
|
data is stored and common components are shared among files. Deduplication
|
||||||
can consume significant processing power (CPU) and memory as well
|
can consume significant processing power (CPU) and memory as well
|
||||||
as generate additional disk IO. Before creating a pool with deduplication
|
as generate additional disk IO. Before creating a pool with deduplication
|
||||||
enabled, ensure that you have planned your hardware requirements appropriately
|
enabled, ensure that you have planned your hardware requirements
|
||||||
and implemented appropriate recovery practices, such as regular backups.
|
appropriately and implemented appropriate recovery practices, such
|
||||||
As an alternative to deduplication consider using compression=lz4,
|
as regular backups. As an alternative to deduplication consider
|
||||||
as a less resource-intensive alternative. should be enabled on the
|
using compression=lz4, as a less resource-intensive alternative.
|
||||||
zvol. Dedup property can be edited after the volume has been created.
|
should be enabled on the zvol. Dedup property can be edited after
|
||||||
Default Value: off.'
|
the volume has been created. Default Value: off.'
|
||||||
enum:
|
enum:
|
||||||
- "on"
|
- "on"
|
||||||
- "off"
|
- "off"
|
||||||
type: string
|
type: string
|
||||||
encryption:
|
encryption:
|
||||||
description: 'Enabling the encryption feature allows for the creation
|
description: 'Enabling the encryption feature allows for the creation
|
||||||
of encrypted filesystems and volumes. ZFS will encrypt file and zvol
|
of encrypted filesystems and volumes. ZFS will encrypt file and
|
||||||
data, file attributes, ACLs, permission bits, directory listings,
|
zvol data, file attributes, ACLs, permission bits, directory listings,
|
||||||
FUID mappings, and userused / groupused data. ZFS will not encrypt
|
FUID mappings, and userused / groupused data. ZFS will not encrypt
|
||||||
metadata related to the pool structure, including dataset and snapshot
|
metadata related to the pool structure, including dataset and snapshot
|
||||||
names, dataset hierarchy, properties, file size, file holes, and deduplication
|
names, dataset hierarchy, properties, file size, file holes, and
|
||||||
tables (though the deduplicated data itself is encrypted). Default
|
deduplication tables (though the deduplicated data itself is encrypted).
|
||||||
Value: off.'
|
Default Value: off.'
|
||||||
pattern: ^(on|off|aes-128-[c,g]cm|aes-192-[c,g]cm|aes-256-[c,g]cm)$
|
pattern: ^(on|off|aes-128-[c,g]cm|aes-192-[c,g]cm|aes-256-[c,g]cm)$
|
||||||
type: string
|
type: string
|
||||||
fsType:
|
fsType:
|
||||||
description: 'FsType specifies filesystem type for the zfs volume/dataset.
|
description: 'FsType specifies filesystem type for the zfs volume/dataset.
|
||||||
If FsType is provided as "zfs", then the driver will create a ZFS
|
If FsType is provided as "zfs", then the driver will create a ZFS
|
||||||
dataset, formatting is not required as underlying filesystem is ZFS
|
dataset, formatting is not required as underlying filesystem is
|
||||||
anyway. If FsType is ext2, ext3, ext4 or xfs, then the driver will
|
ZFS anyway. If FsType is ext2, ext3, ext4 or xfs, then the driver
|
||||||
create a ZVOL and format the volume accordingly. FsType can not be
|
will create a ZVOL and format the volume accordingly. FsType can
|
||||||
modified once volume has been provisioned. Default Value: ext4.'
|
not be modified once volume has been provisioned. Default Value:
|
||||||
|
ext4.'
|
||||||
type: string
|
type: string
|
||||||
keyformat:
|
keyformat:
|
||||||
description: KeyFormat specifies format of the encryption key The supported
|
description: KeyFormat specifies format of the encryption key The
|
||||||
KeyFormats are passphrase, raw, hex.
|
supported KeyFormats are passphrase, raw, hex.
|
||||||
enum:
|
enum:
|
||||||
- passphrase
|
- passphrase
|
||||||
- raw
|
- raw
|
||||||
|
|
@ -166,9 +171,9 @@ spec:
|
||||||
description: KeyLocation is the location of key for the encryption
|
description: KeyLocation is the location of key for the encryption
|
||||||
type: string
|
type: string
|
||||||
ownerNodeID:
|
ownerNodeID:
|
||||||
description: OwnerNodeID is the Node ID where the ZPOOL is running which
|
description: OwnerNodeID is the Node ID where the ZPOOL is running
|
||||||
is where the volume has been provisioned. OwnerNodeID can not be edited
|
which is where the volume has been provisioned. OwnerNodeID can
|
||||||
after the volume has been provisioned.
|
not be edited after the volume has been provisioned.
|
||||||
minLength: 1
|
minLength: 1
|
||||||
type: string
|
type: string
|
||||||
poolName:
|
poolName:
|
||||||
|
|
@ -186,28 +191,36 @@ spec:
|
||||||
files are unaffected. Default Value: 128k.'
|
files are unaffected. Default Value: 128k.'
|
||||||
minLength: 1
|
minLength: 1
|
||||||
type: string
|
type: string
|
||||||
|
shared:
|
||||||
|
description: Shared specifies whether the volume can be shared among
|
||||||
|
multiple pods. If it is not set to "yes", then the ZFS-LocalPV Driver
|
||||||
|
will not allow the volumes to be mounted by more than one pods.
|
||||||
|
enum:
|
||||||
|
- "yes"
|
||||||
|
- "no"
|
||||||
|
type: string
|
||||||
snapname:
|
snapname:
|
||||||
description: SnapName specifies the name of the snapshot where the volume
|
description: SnapName specifies the name of the snapshot where the
|
||||||
has been cloned from. Snapname can not be edited after the volume
|
volume has been cloned from. Snapname can not be edited after the
|
||||||
has been provisioned.
|
volume has been provisioned.
|
||||||
type: string
|
type: string
|
||||||
thinProvision:
|
thinProvision:
|
||||||
description: 'ThinProvision describes whether space reservation for
|
description: 'ThinProvision describes whether space reservation for
|
||||||
the source volume is required or not. The value "yes" indicates that
|
the source volume is required or not. The value "yes" indicates
|
||||||
volume should be thin provisioned and "no" means thick provisioning
|
that volume should be thin provisioned and "no" means thick provisioning
|
||||||
of the volume. If thinProvision is set to "yes" then volume can be
|
of the volume. If thinProvision is set to "yes" then volume can
|
||||||
provisioned even if the ZPOOL does not have the enough capacity. If
|
be provisioned even if the ZPOOL does not have the enough capacity.
|
||||||
thinProvision is set to "no" then volume can be provisioned only if
|
If thinProvision is set to "no" then volume can be provisioned only
|
||||||
the ZPOOL has enough capacity and capacity required by volume can
|
if the ZPOOL has enough capacity and capacity required by volume
|
||||||
be reserved. ThinProvision can not be modified once volume has been
|
can be reserved. ThinProvision can not be modified once volume has
|
||||||
provisioned. Default Value: no.'
|
been provisioned. Default Value: no.'
|
||||||
enum:
|
enum:
|
||||||
- "yes"
|
- "yes"
|
||||||
- "no"
|
- "no"
|
||||||
type: string
|
type: string
|
||||||
volblocksize:
|
volblocksize:
|
||||||
description: 'VolBlockSize specifies the block size for the zvol. The
|
description: 'VolBlockSize specifies the block size for the zvol.
|
||||||
volsize can only be set to a multiple of volblocksize, and cannot
|
The volsize can only be set to a multiple of volblocksize, and cannot
|
||||||
be zero. VolBlockSize can not be edited after the volume has been
|
be zero. VolBlockSize can not be edited after the volume has been
|
||||||
provisioned. Default Value: 8k.'
|
provisioned. Default Value: 8k.'
|
||||||
minLength: 1
|
minLength: 1
|
||||||
|
|
@ -245,12 +258,179 @@ spec:
|
||||||
required:
|
required:
|
||||||
- spec
|
- spec
|
||||||
type: object
|
type: object
|
||||||
version: v1
|
|
||||||
versions:
|
|
||||||
- name: v1
|
|
||||||
served: true
|
served: true
|
||||||
storage: true
|
storage: true
|
||||||
- name: v1alpha1
|
- name: v1alpha1
|
||||||
|
schema:
|
||||||
|
openAPIV3Schema:
|
||||||
|
description: ZFSVolume represents a ZFS based volume
|
||||||
|
properties:
|
||||||
|
apiVersion:
|
||||||
|
description: 'APIVersion defines the versioned schema of this representation
|
||||||
|
of an object. Servers should convert recognized schemas to the latest
|
||||||
|
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources'
|
||||||
|
type: string
|
||||||
|
kind:
|
||||||
|
description: 'Kind is a string value representing the REST resource this
|
||||||
|
object represents. Servers may infer this from the endpoint the client
|
||||||
|
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds'
|
||||||
|
type: string
|
||||||
|
metadata:
|
||||||
|
type: object
|
||||||
|
spec:
|
||||||
|
description: VolumeInfo defines ZFS volume parameters for all modes in
|
||||||
|
which ZFS volumes can be created like - ZFS volume with filesystem,
|
||||||
|
ZFS Volume exposed as zfs or ZFS volume exposed as raw block device.
|
||||||
|
Some of the parameters can be only set during creation time (as specified
|
||||||
|
in the details of the parameter), and a few are editable. In case of
|
||||||
|
Cloned volumes, the parameters are assigned the same values as the source
|
||||||
|
volume.
|
||||||
|
properties:
|
||||||
|
capacity:
|
||||||
|
description: Capacity of the volume
|
||||||
|
minLength: 1
|
||||||
|
type: string
|
||||||
|
compression:
|
||||||
|
description: 'Compression specifies the block-level compression algorithm
|
||||||
|
to be applied to the ZFS Volume. The value "on" indicates ZFS to
|
||||||
|
use the default compression algorithm. The default compression algorithm
|
||||||
|
used by ZFS will be either lzjb or, if the lz4_compress feature
|
||||||
|
is enabled, lz4. Compression property can be edited after the volume
|
||||||
|
has been created. The change will only be applied to the newly-written
|
||||||
|
data. For instance, if the Volume was created with "off" and the
|
||||||
|
next day the compression was modified to "on", the data written
|
||||||
|
prior to setting "on" will not be compressed. Default Value: off.'
|
||||||
|
pattern: ^(on|off|lzjb|gzip|gzip-[1-9]|zle|lz4)$
|
||||||
|
type: string
|
||||||
|
dedup:
|
||||||
|
description: 'Deduplication is the process for removing redundant
|
||||||
|
data at the block level, reducing the total amount of data stored.
|
||||||
|
If a file system has the dedup property enabled, duplicate data
|
||||||
|
blocks are removed synchronously. The result is that only unique
|
||||||
|
data is stored and common components are shared among files. Deduplication
|
||||||
|
can consume significant processing power (CPU) and memory as well
|
||||||
|
as generate additional disk IO. Before creating a pool with deduplication
|
||||||
|
enabled, ensure that you have planned your hardware requirements
|
||||||
|
appropriately and implemented appropriate recovery practices, such
|
||||||
|
as regular backups. As an alternative to deduplication consider
|
||||||
|
using compression=lz4, as a less resource-intensive alternative.
|
||||||
|
should be enabled on the zvol. Dedup property can be edited after
|
||||||
|
the volume has been created. Default Value: off.'
|
||||||
|
enum:
|
||||||
|
- "on"
|
||||||
|
- "off"
|
||||||
|
type: string
|
||||||
|
encryption:
|
||||||
|
description: 'Enabling the encryption feature allows for the creation
|
||||||
|
of encrypted filesystems and volumes. ZFS will encrypt file and
|
||||||
|
zvol data, file attributes, ACLs, permission bits, directory listings,
|
||||||
|
FUID mappings, and userused / groupused data. ZFS will not encrypt
|
||||||
|
metadata related to the pool structure, including dataset and snapshot
|
||||||
|
names, dataset hierarchy, properties, file size, file holes, and
|
||||||
|
deduplication tables (though the deduplicated data itself is encrypted).
|
||||||
|
Default Value: off.'
|
||||||
|
pattern: ^(on|off|aes-128-[c,g]cm|aes-192-[c,g]cm|aes-256-[c,g]cm)$
|
||||||
|
type: string
|
||||||
|
fsType:
|
||||||
|
description: 'FsType specifies filesystem type for the zfs volume/dataset.
|
||||||
|
If FsType is provided as "zfs", then the driver will create a ZFS
|
||||||
|
dataset, formatting is not required as underlying filesystem is
|
||||||
|
ZFS anyway. If FsType is ext2, ext3, ext4 or xfs, then the driver
|
||||||
|
will create a ZVOL and format the volume accordingly. FsType can
|
||||||
|
not be modified once volume has been provisioned. Default Value:
|
||||||
|
ext4.'
|
||||||
|
type: string
|
||||||
|
keyformat:
|
||||||
|
description: KeyFormat specifies format of the encryption key The
|
||||||
|
supported KeyFormats are passphrase, raw, hex.
|
||||||
|
enum:
|
||||||
|
- passphrase
|
||||||
|
- raw
|
||||||
|
- hex
|
||||||
|
type: string
|
||||||
|
keylocation:
|
||||||
|
description: KeyLocation is the location of key for the encryption
|
||||||
|
type: string
|
||||||
|
ownerNodeID:
|
||||||
|
description: OwnerNodeID is the Node ID where the ZPOOL is running
|
||||||
|
which is where the volume has been provisioned. OwnerNodeID can
|
||||||
|
not be edited after the volume has been provisioned.
|
||||||
|
minLength: 1
|
||||||
|
type: string
|
||||||
|
poolName:
|
||||||
|
description: poolName specifies the name of the pool where the volume
|
||||||
|
has been created. PoolName can not be edited after the volume has
|
||||||
|
been provisioned.
|
||||||
|
minLength: 1
|
||||||
|
type: string
|
||||||
|
recordsize:
|
||||||
|
description: 'Specifies a suggested block size for files in the file
|
||||||
|
system. The size specified must be a power of two greater than or
|
||||||
|
equal to 512 and less than or equal to 128 Kbytes. RecordSize property
|
||||||
|
can be edited after the volume has been created. Changing the file
|
||||||
|
system''s recordsize affects only files created afterward; existing
|
||||||
|
files are unaffected. Default Value: 128k.'
|
||||||
|
minLength: 1
|
||||||
|
type: string
|
||||||
|
snapname:
|
||||||
|
description: SnapName specifies the name of the snapshot where the
|
||||||
|
volume has been cloned from. Snapname can not be edited after the
|
||||||
|
volume has been provisioned.
|
||||||
|
type: string
|
||||||
|
thinProvision:
|
||||||
|
description: 'ThinProvision describes whether space reservation for
|
||||||
|
the source volume is required or not. The value "yes" indicates
|
||||||
|
that volume should be thin provisioned and "no" means thick provisioning
|
||||||
|
of the volume. If thinProvision is set to "yes" then volume can
|
||||||
|
be provisioned even if the ZPOOL does not have the enough capacity.
|
||||||
|
If thinProvision is set to "no" then volume can be provisioned only
|
||||||
|
if the ZPOOL has enough capacity and capacity required by volume
|
||||||
|
can be reserved. ThinProvision can not be modified once volume has
|
||||||
|
been provisioned. Default Value: no.'
|
||||||
|
enum:
|
||||||
|
- "yes"
|
||||||
|
- "no"
|
||||||
|
type: string
|
||||||
|
volblocksize:
|
||||||
|
description: 'VolBlockSize specifies the block size for the zvol.
|
||||||
|
The volsize can only be set to a multiple of volblocksize, and cannot
|
||||||
|
be zero. VolBlockSize can not be edited after the volume has been
|
||||||
|
provisioned. Default Value: 8k.'
|
||||||
|
minLength: 1
|
||||||
|
type: string
|
||||||
|
volumeType:
|
||||||
|
description: volumeType determines whether the volume is of type "DATASET"
|
||||||
|
or "ZVOL". If fstype provided in the storageclass is "zfs", a volume
|
||||||
|
of type dataset will be created. If "ext4", "ext3", "ext2" or "xfs"
|
||||||
|
is mentioned as fstype in the storageclass, then a volume of type
|
||||||
|
zvol will be created, which will be further formatted as the fstype
|
||||||
|
provided in the storageclass. VolumeType can not be modified once
|
||||||
|
volume has been provisioned.
|
||||||
|
enum:
|
||||||
|
- ZVOL
|
||||||
|
- DATASET
|
||||||
|
type: string
|
||||||
|
required:
|
||||||
|
- capacity
|
||||||
|
- ownerNodeID
|
||||||
|
- poolName
|
||||||
|
- volumeType
|
||||||
|
type: object
|
||||||
|
status:
|
||||||
|
properties:
|
||||||
|
state:
|
||||||
|
description: State specifies the current state of the volume provisioning
|
||||||
|
request. The state "Pending" means that the volume creation request
|
||||||
|
has not processed yet. The state "Ready" means that the volume has
|
||||||
|
been created and it is ready for the use.
|
||||||
|
enum:
|
||||||
|
- Pending
|
||||||
|
- Ready
|
||||||
|
type: string
|
||||||
|
type: object
|
||||||
|
required:
|
||||||
|
- spec
|
||||||
|
type: object
|
||||||
served: true
|
served: true
|
||||||
storage: false
|
storage: false
|
||||||
status:
|
status:
|
||||||
|
|
@ -290,7 +470,10 @@ spec:
|
||||||
singular: zfssnapshot
|
singular: zfssnapshot
|
||||||
preserveUnknownFields: false
|
preserveUnknownFields: false
|
||||||
scope: Namespaced
|
scope: Namespaced
|
||||||
validation:
|
version: v1
|
||||||
|
versions:
|
||||||
|
- name: v1
|
||||||
|
schema:
|
||||||
openAPIV3Schema:
|
openAPIV3Schema:
|
||||||
description: ZFSSnapshot represents a ZFS Snapshot of the zfsvolume
|
description: ZFSSnapshot represents a ZFS Snapshot of the zfsvolume
|
||||||
properties:
|
properties:
|
||||||
|
|
@ -307,12 +490,13 @@ spec:
|
||||||
metadata:
|
metadata:
|
||||||
type: object
|
type: object
|
||||||
spec:
|
spec:
|
||||||
description: VolumeInfo defines ZFS volume parameters for all modes in which
|
description: VolumeInfo defines ZFS volume parameters for all modes in
|
||||||
ZFS volumes can be created like - ZFS volume with filesystem, ZFS Volume
|
which ZFS volumes can be created like - ZFS volume with filesystem,
|
||||||
exposed as zfs or ZFS volume exposed as raw block device. Some of the
|
ZFS Volume exposed as zfs or ZFS volume exposed as raw block device.
|
||||||
parameters can be only set during creation time (as specified in the details
|
Some of the parameters can be only set during creation time (as specified
|
||||||
of the parameter), and a few are editable. In case of Cloned volumes,
|
in the details of the parameter), and a few are editable. In case of
|
||||||
the parameters are assigned the same values as the source volume.
|
Cloned volumes, the parameters are assigned the same values as the source
|
||||||
|
volume.
|
||||||
properties:
|
properties:
|
||||||
capacity:
|
capacity:
|
||||||
description: Capacity of the volume
|
description: Capacity of the volume
|
||||||
|
|
@ -320,56 +504,57 @@ spec:
|
||||||
type: string
|
type: string
|
||||||
compression:
|
compression:
|
||||||
description: 'Compression specifies the block-level compression algorithm
|
description: 'Compression specifies the block-level compression algorithm
|
||||||
to be applied to the ZFS Volume. The value "on" indicates ZFS to use
|
to be applied to the ZFS Volume. The value "on" indicates ZFS to
|
||||||
the default compression algorithm. The default compression algorithm
|
use the default compression algorithm. The default compression algorithm
|
||||||
used by ZFS will be either lzjb or, if the lz4_compress feature is
|
used by ZFS will be either lzjb or, if the lz4_compress feature
|
||||||
enabled, lz4. Compression property can be edited after the volume
|
is enabled, lz4. Compression property can be edited after the volume
|
||||||
has been created. The change will only be applied to the newly-written
|
has been created. The change will only be applied to the newly-written
|
||||||
data. For instance, if the Volume was created with "off" and the next
|
data. For instance, if the Volume was created with "off" and the
|
||||||
day the compression was modified to "on", the data written prior to
|
next day the compression was modified to "on", the data written
|
||||||
setting "on" will not be compressed. Default Value: off.'
|
prior to setting "on" will not be compressed. Default Value: off.'
|
||||||
pattern: ^(on|off|lzjb|gzip|gzip-[1-9]|zle|lz4)$
|
pattern: ^(on|off|lzjb|gzip|gzip-[1-9]|zle|lz4)$
|
||||||
type: string
|
type: string
|
||||||
dedup:
|
dedup:
|
||||||
description: 'Deduplication is the process for removing redundant data
|
description: 'Deduplication is the process for removing redundant
|
||||||
at the block level, reducing the total amount of data stored. If a
|
data at the block level, reducing the total amount of data stored.
|
||||||
file system has the dedup property enabled, duplicate data blocks
|
If a file system has the dedup property enabled, duplicate data
|
||||||
are removed synchronously. The result is that only unique data is
|
blocks are removed synchronously. The result is that only unique
|
||||||
stored and common components are shared among files. Deduplication
|
data is stored and common components are shared among files. Deduplication
|
||||||
can consume significant processing power (CPU) and memory as well
|
can consume significant processing power (CPU) and memory as well
|
||||||
as generate additional disk IO. Before creating a pool with deduplication
|
as generate additional disk IO. Before creating a pool with deduplication
|
||||||
enabled, ensure that you have planned your hardware requirements appropriately
|
enabled, ensure that you have planned your hardware requirements
|
||||||
and implemented appropriate recovery practices, such as regular backups.
|
appropriately and implemented appropriate recovery practices, such
|
||||||
As an alternative to deduplication consider using compression=lz4,
|
as regular backups. As an alternative to deduplication consider
|
||||||
as a less resource-intensive alternative. should be enabled on the
|
using compression=lz4, as a less resource-intensive alternative.
|
||||||
zvol. Dedup property can be edited after the volume has been created.
|
should be enabled on the zvol. Dedup property can be edited after
|
||||||
Default Value: off.'
|
the volume has been created. Default Value: off.'
|
||||||
enum:
|
enum:
|
||||||
- "on"
|
- "on"
|
||||||
- "off"
|
- "off"
|
||||||
type: string
|
type: string
|
||||||
encryption:
|
encryption:
|
||||||
description: 'Enabling the encryption feature allows for the creation
|
description: 'Enabling the encryption feature allows for the creation
|
||||||
of encrypted filesystems and volumes. ZFS will encrypt file and zvol
|
of encrypted filesystems and volumes. ZFS will encrypt file and
|
||||||
data, file attributes, ACLs, permission bits, directory listings,
|
zvol data, file attributes, ACLs, permission bits, directory listings,
|
||||||
FUID mappings, and userused / groupused data. ZFS will not encrypt
|
FUID mappings, and userused / groupused data. ZFS will not encrypt
|
||||||
metadata related to the pool structure, including dataset and snapshot
|
metadata related to the pool structure, including dataset and snapshot
|
||||||
names, dataset hierarchy, properties, file size, file holes, and deduplication
|
names, dataset hierarchy, properties, file size, file holes, and
|
||||||
tables (though the deduplicated data itself is encrypted). Default
|
deduplication tables (though the deduplicated data itself is encrypted).
|
||||||
Value: off.'
|
Default Value: off.'
|
||||||
pattern: ^(on|off|aes-128-[c,g]cm|aes-192-[c,g]cm|aes-256-[c,g]cm)$
|
pattern: ^(on|off|aes-128-[c,g]cm|aes-192-[c,g]cm|aes-256-[c,g]cm)$
|
||||||
type: string
|
type: string
|
||||||
fsType:
|
fsType:
|
||||||
description: 'FsType specifies filesystem type for the zfs volume/dataset.
|
description: 'FsType specifies filesystem type for the zfs volume/dataset.
|
||||||
If FsType is provided as "zfs", then the driver will create a ZFS
|
If FsType is provided as "zfs", then the driver will create a ZFS
|
||||||
dataset, formatting is not required as underlying filesystem is ZFS
|
dataset, formatting is not required as underlying filesystem is
|
||||||
anyway. If FsType is ext2, ext3, ext4 or xfs, then the driver will
|
ZFS anyway. If FsType is ext2, ext3, ext4 or xfs, then the driver
|
||||||
create a ZVOL and format the volume accordingly. FsType can not be
|
will create a ZVOL and format the volume accordingly. FsType can
|
||||||
modified once volume has been provisioned. Default Value: ext4.'
|
not be modified once volume has been provisioned. Default Value:
|
||||||
|
ext4.'
|
||||||
type: string
|
type: string
|
||||||
keyformat:
|
keyformat:
|
||||||
description: KeyFormat specifies format of the encryption key The supported
|
description: KeyFormat specifies format of the encryption key The
|
||||||
KeyFormats are passphrase, raw, hex.
|
supported KeyFormats are passphrase, raw, hex.
|
||||||
enum:
|
enum:
|
||||||
- passphrase
|
- passphrase
|
||||||
- raw
|
- raw
|
||||||
|
|
@ -379,9 +564,9 @@ spec:
|
||||||
description: KeyLocation is the location of key for the encryption
|
description: KeyLocation is the location of key for the encryption
|
||||||
type: string
|
type: string
|
||||||
ownerNodeID:
|
ownerNodeID:
|
||||||
description: OwnerNodeID is the Node ID where the ZPOOL is running which
|
description: OwnerNodeID is the Node ID where the ZPOOL is running
|
||||||
is where the volume has been provisioned. OwnerNodeID can not be edited
|
which is where the volume has been provisioned. OwnerNodeID can
|
||||||
after the volume has been provisioned.
|
not be edited after the volume has been provisioned.
|
||||||
minLength: 1
|
minLength: 1
|
||||||
type: string
|
type: string
|
||||||
poolName:
|
poolName:
|
||||||
|
|
@ -399,28 +584,36 @@ spec:
|
||||||
files are unaffected. Default Value: 128k.'
|
files are unaffected. Default Value: 128k.'
|
||||||
minLength: 1
|
minLength: 1
|
||||||
type: string
|
type: string
|
||||||
|
shared:
|
||||||
|
description: Shared specifies whether the volume can be shared among
|
||||||
|
multiple pods. If it is not set to "yes", then the ZFS-LocalPV Driver
|
||||||
|
will not allow the volumes to be mounted by more than one pods.
|
||||||
|
enum:
|
||||||
|
- "yes"
|
||||||
|
- "no"
|
||||||
|
type: string
|
||||||
snapname:
|
snapname:
|
||||||
description: SnapName specifies the name of the snapshot where the volume
|
description: SnapName specifies the name of the snapshot where the
|
||||||
has been cloned from. Snapname can not be edited after the volume
|
volume has been cloned from. Snapname can not be edited after the
|
||||||
has been provisioned.
|
volume has been provisioned.
|
||||||
type: string
|
type: string
|
||||||
thinProvision:
|
thinProvision:
|
||||||
description: 'ThinProvision describes whether space reservation for
|
description: 'ThinProvision describes whether space reservation for
|
||||||
the source volume is required or not. The value "yes" indicates that
|
the source volume is required or not. The value "yes" indicates
|
||||||
volume should be thin provisioned and "no" means thick provisioning
|
that volume should be thin provisioned and "no" means thick provisioning
|
||||||
of the volume. If thinProvision is set to "yes" then volume can be
|
of the volume. If thinProvision is set to "yes" then volume can
|
||||||
provisioned even if the ZPOOL does not have the enough capacity. If
|
be provisioned even if the ZPOOL does not have the enough capacity.
|
||||||
thinProvision is set to "no" then volume can be provisioned only if
|
If thinProvision is set to "no" then volume can be provisioned only
|
||||||
the ZPOOL has enough capacity and capacity required by volume can
|
if the ZPOOL has enough capacity and capacity required by volume
|
||||||
be reserved. ThinProvision can not be modified once volume has been
|
can be reserved. ThinProvision can not be modified once volume has
|
||||||
provisioned. Default Value: no.'
|
been provisioned. Default Value: no.'
|
||||||
enum:
|
enum:
|
||||||
- "yes"
|
- "yes"
|
||||||
- "no"
|
- "no"
|
||||||
type: string
|
type: string
|
||||||
volblocksize:
|
volblocksize:
|
||||||
description: 'VolBlockSize specifies the block size for the zvol. The
|
description: 'VolBlockSize specifies the block size for the zvol.
|
||||||
volsize can only be set to a multiple of volblocksize, and cannot
|
The volsize can only be set to a multiple of volblocksize, and cannot
|
||||||
be zero. VolBlockSize can not be edited after the volume has been
|
be zero. VolBlockSize can not be edited after the volume has been
|
||||||
provisioned. Default Value: 8k.'
|
provisioned. Default Value: 8k.'
|
||||||
minLength: 1
|
minLength: 1
|
||||||
|
|
@ -452,12 +645,173 @@ spec:
|
||||||
- spec
|
- spec
|
||||||
- status
|
- status
|
||||||
type: object
|
type: object
|
||||||
version: v1
|
|
||||||
versions:
|
|
||||||
- name: v1
|
|
||||||
served: true
|
served: true
|
||||||
storage: true
|
storage: true
|
||||||
- name: v1alpha1
|
- name: v1alpha1
|
||||||
|
schema:
|
||||||
|
openAPIV3Schema:
|
||||||
|
description: ZFSSnapshot represents a ZFS Snapshot of the zfsvolume
|
||||||
|
properties:
|
||||||
|
apiVersion:
|
||||||
|
description: 'APIVersion defines the versioned schema of this representation
|
||||||
|
of an object. Servers should convert recognized schemas to the latest
|
||||||
|
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources'
|
||||||
|
type: string
|
||||||
|
kind:
|
||||||
|
description: 'Kind is a string value representing the REST resource this
|
||||||
|
object represents. Servers may infer this from the endpoint the client
|
||||||
|
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds'
|
||||||
|
type: string
|
||||||
|
metadata:
|
||||||
|
type: object
|
||||||
|
spec:
|
||||||
|
description: VolumeInfo defines ZFS volume parameters for all modes in
|
||||||
|
which ZFS volumes can be created like - ZFS volume with filesystem,
|
||||||
|
ZFS Volume exposed as zfs or ZFS volume exposed as raw block device.
|
||||||
|
Some of the parameters can be only set during creation time (as specified
|
||||||
|
in the details of the parameter), and a few are editable. In case of
|
||||||
|
Cloned volumes, the parameters are assigned the same values as the source
|
||||||
|
volume.
|
||||||
|
properties:
|
||||||
|
capacity:
|
||||||
|
description: Capacity of the volume
|
||||||
|
minLength: 1
|
||||||
|
type: string
|
||||||
|
compression:
|
||||||
|
description: 'Compression specifies the block-level compression algorithm
|
||||||
|
to be applied to the ZFS Volume. The value "on" indicates ZFS to
|
||||||
|
use the default compression algorithm. The default compression algorithm
|
||||||
|
used by ZFS will be either lzjb or, if the lz4_compress feature
|
||||||
|
is enabled, lz4. Compression property can be edited after the volume
|
||||||
|
has been created. The change will only be applied to the newly-written
|
||||||
|
data. For instance, if the Volume was created with "off" and the
|
||||||
|
next day the compression was modified to "on", the data written
|
||||||
|
prior to setting "on" will not be compressed. Default Value: off.'
|
||||||
|
pattern: ^(on|off|lzjb|gzip|gzip-[1-9]|zle|lz4)$
|
||||||
|
type: string
|
||||||
|
dedup:
|
||||||
|
description: 'Deduplication is the process for removing redundant
|
||||||
|
data at the block level, reducing the total amount of data stored.
|
||||||
|
If a file system has the dedup property enabled, duplicate data
|
||||||
|
blocks are removed synchronously. The result is that only unique
|
||||||
|
data is stored and common components are shared among files. Deduplication
|
||||||
|
can consume significant processing power (CPU) and memory as well
|
||||||
|
as generate additional disk IO. Before creating a pool with deduplication
|
||||||
|
enabled, ensure that you have planned your hardware requirements
|
||||||
|
appropriately and implemented appropriate recovery practices, such
|
||||||
|
as regular backups. As an alternative to deduplication consider
|
||||||
|
using compression=lz4, as a less resource-intensive alternative.
|
||||||
|
should be enabled on the zvol. Dedup property can be edited after
|
||||||
|
the volume has been created. Default Value: off.'
|
||||||
|
enum:
|
||||||
|
- "on"
|
||||||
|
- "off"
|
||||||
|
type: string
|
||||||
|
encryption:
|
||||||
|
description: 'Enabling the encryption feature allows for the creation
|
||||||
|
of encrypted filesystems and volumes. ZFS will encrypt file and
|
||||||
|
zvol data, file attributes, ACLs, permission bits, directory listings,
|
||||||
|
FUID mappings, and userused / groupused data. ZFS will not encrypt
|
||||||
|
metadata related to the pool structure, including dataset and snapshot
|
||||||
|
names, dataset hierarchy, properties, file size, file holes, and
|
||||||
|
deduplication tables (though the deduplicated data itself is encrypted).
|
||||||
|
Default Value: off.'
|
||||||
|
pattern: ^(on|off|aes-128-[c,g]cm|aes-192-[c,g]cm|aes-256-[c,g]cm)$
|
||||||
|
type: string
|
||||||
|
fsType:
|
||||||
|
description: 'FsType specifies filesystem type for the zfs volume/dataset.
|
||||||
|
If FsType is provided as "zfs", then the driver will create a ZFS
|
||||||
|
dataset, formatting is not required as underlying filesystem is
|
||||||
|
ZFS anyway. If FsType is ext2, ext3, ext4 or xfs, then the driver
|
||||||
|
will create a ZVOL and format the volume accordingly. FsType can
|
||||||
|
not be modified once volume has been provisioned. Default Value:
|
||||||
|
ext4.'
|
||||||
|
type: string
|
||||||
|
keyformat:
|
||||||
|
description: KeyFormat specifies format of the encryption key The
|
||||||
|
supported KeyFormats are passphrase, raw, hex.
|
||||||
|
enum:
|
||||||
|
- passphrase
|
||||||
|
- raw
|
||||||
|
- hex
|
||||||
|
type: string
|
||||||
|
keylocation:
|
||||||
|
description: KeyLocation is the location of key for the encryption
|
||||||
|
type: string
|
||||||
|
ownerNodeID:
|
||||||
|
description: OwnerNodeID is the Node ID where the ZPOOL is running
|
||||||
|
which is where the volume has been provisioned. OwnerNodeID can
|
||||||
|
not be edited after the volume has been provisioned.
|
||||||
|
minLength: 1
|
||||||
|
type: string
|
||||||
|
poolName:
|
||||||
|
description: poolName specifies the name of the pool where the volume
|
||||||
|
has been created. PoolName can not be edited after the volume has
|
||||||
|
been provisioned.
|
||||||
|
minLength: 1
|
||||||
|
type: string
|
||||||
|
recordsize:
|
||||||
|
description: 'Specifies a suggested block size for files in the file
|
||||||
|
system. The size specified must be a power of two greater than or
|
||||||
|
equal to 512 and less than or equal to 128 Kbytes. RecordSize property
|
||||||
|
can be edited after the volume has been created. Changing the file
|
||||||
|
system''s recordsize affects only files created afterward; existing
|
||||||
|
files are unaffected. Default Value: 128k.'
|
||||||
|
minLength: 1
|
||||||
|
type: string
|
||||||
|
snapname:
|
||||||
|
description: SnapName specifies the name of the snapshot where the
|
||||||
|
volume has been cloned from. Snapname can not be edited after the
|
||||||
|
volume has been provisioned.
|
||||||
|
type: string
|
||||||
|
thinProvision:
|
||||||
|
description: 'ThinProvision describes whether space reservation for
|
||||||
|
the source volume is required or not. The value "yes" indicates
|
||||||
|
that volume should be thin provisioned and "no" means thick provisioning
|
||||||
|
of the volume. If thinProvision is set to "yes" then volume can
|
||||||
|
be provisioned even if the ZPOOL does not have the enough capacity.
|
||||||
|
If thinProvision is set to "no" then volume can be provisioned only
|
||||||
|
if the ZPOOL has enough capacity and capacity required by volume
|
||||||
|
can be reserved. ThinProvision can not be modified once volume has
|
||||||
|
been provisioned. Default Value: no.'
|
||||||
|
enum:
|
||||||
|
- "yes"
|
||||||
|
- "no"
|
||||||
|
type: string
|
||||||
|
volblocksize:
|
||||||
|
description: 'VolBlockSize specifies the block size for the zvol.
|
||||||
|
The volsize can only be set to a multiple of volblocksize, and cannot
|
||||||
|
be zero. VolBlockSize can not be edited after the volume has been
|
||||||
|
provisioned. Default Value: 8k.'
|
||||||
|
minLength: 1
|
||||||
|
type: string
|
||||||
|
volumeType:
|
||||||
|
description: volumeType determines whether the volume is of type "DATASET"
|
||||||
|
or "ZVOL". If fstype provided in the storageclass is "zfs", a volume
|
||||||
|
of type dataset will be created. If "ext4", "ext3", "ext2" or "xfs"
|
||||||
|
is mentioned as fstype in the storageclass, then a volume of type
|
||||||
|
zvol will be created, which will be further formatted as the fstype
|
||||||
|
provided in the storageclass. VolumeType can not be modified once
|
||||||
|
volume has been provisioned.
|
||||||
|
enum:
|
||||||
|
- ZVOL
|
||||||
|
- DATASET
|
||||||
|
type: string
|
||||||
|
required:
|
||||||
|
- capacity
|
||||||
|
- ownerNodeID
|
||||||
|
- poolName
|
||||||
|
- volumeType
|
||||||
|
type: object
|
||||||
|
status:
|
||||||
|
properties:
|
||||||
|
state:
|
||||||
|
type: string
|
||||||
|
type: object
|
||||||
|
required:
|
||||||
|
- spec
|
||||||
|
- status
|
||||||
|
type: object
|
||||||
served: true
|
served: true
|
||||||
storage: false
|
storage: false
|
||||||
status:
|
status:
|
||||||
|
|
|
||||||
|
|
@ -29,7 +29,10 @@ spec:
|
||||||
singular: zfssnapshot
|
singular: zfssnapshot
|
||||||
preserveUnknownFields: false
|
preserveUnknownFields: false
|
||||||
scope: Namespaced
|
scope: Namespaced
|
||||||
validation:
|
version: v1
|
||||||
|
versions:
|
||||||
|
- name: v1
|
||||||
|
schema:
|
||||||
openAPIV3Schema:
|
openAPIV3Schema:
|
||||||
description: ZFSSnapshot represents a ZFS Snapshot of the zfsvolume
|
description: ZFSSnapshot represents a ZFS Snapshot of the zfsvolume
|
||||||
properties:
|
properties:
|
||||||
|
|
@ -46,12 +49,13 @@ spec:
|
||||||
metadata:
|
metadata:
|
||||||
type: object
|
type: object
|
||||||
spec:
|
spec:
|
||||||
description: VolumeInfo defines ZFS volume parameters for all modes in which
|
description: VolumeInfo defines ZFS volume parameters for all modes in
|
||||||
ZFS volumes can be created like - ZFS volume with filesystem, ZFS Volume
|
which ZFS volumes can be created like - ZFS volume with filesystem,
|
||||||
exposed as zfs or ZFS volume exposed as raw block device. Some of the
|
ZFS Volume exposed as zfs or ZFS volume exposed as raw block device.
|
||||||
parameters can be only set during creation time (as specified in the details
|
Some of the parameters can be only set during creation time (as specified
|
||||||
of the parameter), and a few are editable. In case of Cloned volumes,
|
in the details of the parameter), and a few are editable. In case of
|
||||||
the parameters are assigned the same values as the source volume.
|
Cloned volumes, the parameters are assigned the same values as the source
|
||||||
|
volume.
|
||||||
properties:
|
properties:
|
||||||
capacity:
|
capacity:
|
||||||
description: Capacity of the volume
|
description: Capacity of the volume
|
||||||
|
|
@ -59,56 +63,57 @@ spec:
|
||||||
type: string
|
type: string
|
||||||
compression:
|
compression:
|
||||||
description: 'Compression specifies the block-level compression algorithm
|
description: 'Compression specifies the block-level compression algorithm
|
||||||
to be applied to the ZFS Volume. The value "on" indicates ZFS to use
|
to be applied to the ZFS Volume. The value "on" indicates ZFS to
|
||||||
the default compression algorithm. The default compression algorithm
|
use the default compression algorithm. The default compression algorithm
|
||||||
used by ZFS will be either lzjb or, if the lz4_compress feature is
|
used by ZFS will be either lzjb or, if the lz4_compress feature
|
||||||
enabled, lz4. Compression property can be edited after the volume
|
is enabled, lz4. Compression property can be edited after the volume
|
||||||
has been created. The change will only be applied to the newly-written
|
has been created. The change will only be applied to the newly-written
|
||||||
data. For instance, if the Volume was created with "off" and the next
|
data. For instance, if the Volume was created with "off" and the
|
||||||
day the compression was modified to "on", the data written prior to
|
next day the compression was modified to "on", the data written
|
||||||
setting "on" will not be compressed. Default Value: off.'
|
prior to setting "on" will not be compressed. Default Value: off.'
|
||||||
pattern: ^(on|off|lzjb|gzip|gzip-[1-9]|zle|lz4)$
|
pattern: ^(on|off|lzjb|gzip|gzip-[1-9]|zle|lz4)$
|
||||||
type: string
|
type: string
|
||||||
dedup:
|
dedup:
|
||||||
description: 'Deduplication is the process for removing redundant data
|
description: 'Deduplication is the process for removing redundant
|
||||||
at the block level, reducing the total amount of data stored. If a
|
data at the block level, reducing the total amount of data stored.
|
||||||
file system has the dedup property enabled, duplicate data blocks
|
If a file system has the dedup property enabled, duplicate data
|
||||||
are removed synchronously. The result is that only unique data is
|
blocks are removed synchronously. The result is that only unique
|
||||||
stored and common components are shared among files. Deduplication
|
data is stored and common components are shared among files. Deduplication
|
||||||
can consume significant processing power (CPU) and memory as well
|
can consume significant processing power (CPU) and memory as well
|
||||||
as generate additional disk IO. Before creating a pool with deduplication
|
as generate additional disk IO. Before creating a pool with deduplication
|
||||||
enabled, ensure that you have planned your hardware requirements appropriately
|
enabled, ensure that you have planned your hardware requirements
|
||||||
and implemented appropriate recovery practices, such as regular backups.
|
appropriately and implemented appropriate recovery practices, such
|
||||||
As an alternative to deduplication consider using compression=lz4,
|
as regular backups. As an alternative to deduplication consider
|
||||||
as a less resource-intensive alternative. should be enabled on the
|
using compression=lz4, as a less resource-intensive alternative.
|
||||||
zvol. Dedup property can be edited after the volume has been created.
|
should be enabled on the zvol. Dedup property can be edited after
|
||||||
Default Value: off.'
|
the volume has been created. Default Value: off.'
|
||||||
enum:
|
enum:
|
||||||
- "on"
|
- "on"
|
||||||
- "off"
|
- "off"
|
||||||
type: string
|
type: string
|
||||||
encryption:
|
encryption:
|
||||||
description: 'Enabling the encryption feature allows for the creation
|
description: 'Enabling the encryption feature allows for the creation
|
||||||
of encrypted filesystems and volumes. ZFS will encrypt file and zvol
|
of encrypted filesystems and volumes. ZFS will encrypt file and
|
||||||
data, file attributes, ACLs, permission bits, directory listings,
|
zvol data, file attributes, ACLs, permission bits, directory listings,
|
||||||
FUID mappings, and userused / groupused data. ZFS will not encrypt
|
FUID mappings, and userused / groupused data. ZFS will not encrypt
|
||||||
metadata related to the pool structure, including dataset and snapshot
|
metadata related to the pool structure, including dataset and snapshot
|
||||||
names, dataset hierarchy, properties, file size, file holes, and deduplication
|
names, dataset hierarchy, properties, file size, file holes, and
|
||||||
tables (though the deduplicated data itself is encrypted). Default
|
deduplication tables (though the deduplicated data itself is encrypted).
|
||||||
Value: off.'
|
Default Value: off.'
|
||||||
pattern: ^(on|off|aes-128-[c,g]cm|aes-192-[c,g]cm|aes-256-[c,g]cm)$
|
pattern: ^(on|off|aes-128-[c,g]cm|aes-192-[c,g]cm|aes-256-[c,g]cm)$
|
||||||
type: string
|
type: string
|
||||||
fsType:
|
fsType:
|
||||||
description: 'FsType specifies filesystem type for the zfs volume/dataset.
|
description: 'FsType specifies filesystem type for the zfs volume/dataset.
|
||||||
If FsType is provided as "zfs", then the driver will create a ZFS
|
If FsType is provided as "zfs", then the driver will create a ZFS
|
||||||
dataset, formatting is not required as underlying filesystem is ZFS
|
dataset, formatting is not required as underlying filesystem is
|
||||||
anyway. If FsType is ext2, ext3, ext4 or xfs, then the driver will
|
ZFS anyway. If FsType is ext2, ext3, ext4 or xfs, then the driver
|
||||||
create a ZVOL and format the volume accordingly. FsType can not be
|
will create a ZVOL and format the volume accordingly. FsType can
|
||||||
modified once volume has been provisioned. Default Value: ext4.'
|
not be modified once volume has been provisioned. Default Value:
|
||||||
|
ext4.'
|
||||||
type: string
|
type: string
|
||||||
keyformat:
|
keyformat:
|
||||||
description: KeyFormat specifies format of the encryption key The supported
|
description: KeyFormat specifies format of the encryption key The
|
||||||
KeyFormats are passphrase, raw, hex.
|
supported KeyFormats are passphrase, raw, hex.
|
||||||
enum:
|
enum:
|
||||||
- passphrase
|
- passphrase
|
||||||
- raw
|
- raw
|
||||||
|
|
@ -118,9 +123,9 @@ spec:
|
||||||
description: KeyLocation is the location of key for the encryption
|
description: KeyLocation is the location of key for the encryption
|
||||||
type: string
|
type: string
|
||||||
ownerNodeID:
|
ownerNodeID:
|
||||||
description: OwnerNodeID is the Node ID where the ZPOOL is running which
|
description: OwnerNodeID is the Node ID where the ZPOOL is running
|
||||||
is where the volume has been provisioned. OwnerNodeID can not be edited
|
which is where the volume has been provisioned. OwnerNodeID can
|
||||||
after the volume has been provisioned.
|
not be edited after the volume has been provisioned.
|
||||||
minLength: 1
|
minLength: 1
|
||||||
type: string
|
type: string
|
||||||
poolName:
|
poolName:
|
||||||
|
|
@ -138,28 +143,36 @@ spec:
|
||||||
files are unaffected. Default Value: 128k.'
|
files are unaffected. Default Value: 128k.'
|
||||||
minLength: 1
|
minLength: 1
|
||||||
type: string
|
type: string
|
||||||
|
shared:
|
||||||
|
description: Shared specifies whether the volume can be shared among
|
||||||
|
multiple pods. If it is not set to "yes", then the ZFS-LocalPV Driver
|
||||||
|
will not allow the volumes to be mounted by more than one pods.
|
||||||
|
enum:
|
||||||
|
- "yes"
|
||||||
|
- "no"
|
||||||
|
type: string
|
||||||
snapname:
|
snapname:
|
||||||
description: SnapName specifies the name of the snapshot where the volume
|
description: SnapName specifies the name of the snapshot where the
|
||||||
has been cloned from. Snapname can not be edited after the volume
|
volume has been cloned from. Snapname can not be edited after the
|
||||||
has been provisioned.
|
volume has been provisioned.
|
||||||
type: string
|
type: string
|
||||||
thinProvision:
|
thinProvision:
|
||||||
description: 'ThinProvision describes whether space reservation for
|
description: 'ThinProvision describes whether space reservation for
|
||||||
the source volume is required or not. The value "yes" indicates that
|
the source volume is required or not. The value "yes" indicates
|
||||||
volume should be thin provisioned and "no" means thick provisioning
|
that volume should be thin provisioned and "no" means thick provisioning
|
||||||
of the volume. If thinProvision is set to "yes" then volume can be
|
of the volume. If thinProvision is set to "yes" then volume can
|
||||||
provisioned even if the ZPOOL does not have the enough capacity. If
|
be provisioned even if the ZPOOL does not have the enough capacity.
|
||||||
thinProvision is set to "no" then volume can be provisioned only if
|
If thinProvision is set to "no" then volume can be provisioned only
|
||||||
the ZPOOL has enough capacity and capacity required by volume can
|
if the ZPOOL has enough capacity and capacity required by volume
|
||||||
be reserved. ThinProvision can not be modified once volume has been
|
can be reserved. ThinProvision can not be modified once volume has
|
||||||
provisioned. Default Value: no.'
|
been provisioned. Default Value: no.'
|
||||||
enum:
|
enum:
|
||||||
- "yes"
|
- "yes"
|
||||||
- "no"
|
- "no"
|
||||||
type: string
|
type: string
|
||||||
volblocksize:
|
volblocksize:
|
||||||
description: 'VolBlockSize specifies the block size for the zvol. The
|
description: 'VolBlockSize specifies the block size for the zvol.
|
||||||
volsize can only be set to a multiple of volblocksize, and cannot
|
The volsize can only be set to a multiple of volblocksize, and cannot
|
||||||
be zero. VolBlockSize can not be edited after the volume has been
|
be zero. VolBlockSize can not be edited after the volume has been
|
||||||
provisioned. Default Value: 8k.'
|
provisioned. Default Value: 8k.'
|
||||||
minLength: 1
|
minLength: 1
|
||||||
|
|
@ -191,12 +204,173 @@ spec:
|
||||||
- spec
|
- spec
|
||||||
- status
|
- status
|
||||||
type: object
|
type: object
|
||||||
version: v1
|
|
||||||
versions:
|
|
||||||
- name: v1
|
|
||||||
served: true
|
served: true
|
||||||
storage: true
|
storage: true
|
||||||
- name: v1alpha1
|
- name: v1alpha1
|
||||||
|
schema:
|
||||||
|
openAPIV3Schema:
|
||||||
|
description: ZFSSnapshot represents a ZFS Snapshot of the zfsvolume
|
||||||
|
properties:
|
||||||
|
apiVersion:
|
||||||
|
description: 'APIVersion defines the versioned schema of this representation
|
||||||
|
of an object. Servers should convert recognized schemas to the latest
|
||||||
|
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources'
|
||||||
|
type: string
|
||||||
|
kind:
|
||||||
|
description: 'Kind is a string value representing the REST resource this
|
||||||
|
object represents. Servers may infer this from the endpoint the client
|
||||||
|
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds'
|
||||||
|
type: string
|
||||||
|
metadata:
|
||||||
|
type: object
|
||||||
|
spec:
|
||||||
|
description: VolumeInfo defines ZFS volume parameters for all modes in
|
||||||
|
which ZFS volumes can be created like - ZFS volume with filesystem,
|
||||||
|
ZFS Volume exposed as zfs or ZFS volume exposed as raw block device.
|
||||||
|
Some of the parameters can be only set during creation time (as specified
|
||||||
|
in the details of the parameter), and a few are editable. In case of
|
||||||
|
Cloned volumes, the parameters are assigned the same values as the source
|
||||||
|
volume.
|
||||||
|
properties:
|
||||||
|
capacity:
|
||||||
|
description: Capacity of the volume
|
||||||
|
minLength: 1
|
||||||
|
type: string
|
||||||
|
compression:
|
||||||
|
description: 'Compression specifies the block-level compression algorithm
|
||||||
|
to be applied to the ZFS Volume. The value "on" indicates ZFS to
|
||||||
|
use the default compression algorithm. The default compression algorithm
|
||||||
|
used by ZFS will be either lzjb or, if the lz4_compress feature
|
||||||
|
is enabled, lz4. Compression property can be edited after the volume
|
||||||
|
has been created. The change will only be applied to the newly-written
|
||||||
|
data. For instance, if the Volume was created with "off" and the
|
||||||
|
next day the compression was modified to "on", the data written
|
||||||
|
prior to setting "on" will not be compressed. Default Value: off.'
|
||||||
|
pattern: ^(on|off|lzjb|gzip|gzip-[1-9]|zle|lz4)$
|
||||||
|
type: string
|
||||||
|
dedup:
|
||||||
|
description: 'Deduplication is the process for removing redundant
|
||||||
|
data at the block level, reducing the total amount of data stored.
|
||||||
|
If a file system has the dedup property enabled, duplicate data
|
||||||
|
blocks are removed synchronously. The result is that only unique
|
||||||
|
data is stored and common components are shared among files. Deduplication
|
||||||
|
can consume significant processing power (CPU) and memory as well
|
||||||
|
as generate additional disk IO. Before creating a pool with deduplication
|
||||||
|
enabled, ensure that you have planned your hardware requirements
|
||||||
|
appropriately and implemented appropriate recovery practices, such
|
||||||
|
as regular backups. As an alternative to deduplication consider
|
||||||
|
using compression=lz4, as a less resource-intensive alternative.
|
||||||
|
should be enabled on the zvol. Dedup property can be edited after
|
||||||
|
the volume has been created. Default Value: off.'
|
||||||
|
enum:
|
||||||
|
- "on"
|
||||||
|
- "off"
|
||||||
|
type: string
|
||||||
|
encryption:
|
||||||
|
description: 'Enabling the encryption feature allows for the creation
|
||||||
|
of encrypted filesystems and volumes. ZFS will encrypt file and
|
||||||
|
zvol data, file attributes, ACLs, permission bits, directory listings,
|
||||||
|
FUID mappings, and userused / groupused data. ZFS will not encrypt
|
||||||
|
metadata related to the pool structure, including dataset and snapshot
|
||||||
|
names, dataset hierarchy, properties, file size, file holes, and
|
||||||
|
deduplication tables (though the deduplicated data itself is encrypted).
|
||||||
|
Default Value: off.'
|
||||||
|
pattern: ^(on|off|aes-128-[c,g]cm|aes-192-[c,g]cm|aes-256-[c,g]cm)$
|
||||||
|
type: string
|
||||||
|
fsType:
|
||||||
|
description: 'FsType specifies filesystem type for the zfs volume/dataset.
|
||||||
|
If FsType is provided as "zfs", then the driver will create a ZFS
|
||||||
|
dataset, formatting is not required as underlying filesystem is
|
||||||
|
ZFS anyway. If FsType is ext2, ext3, ext4 or xfs, then the driver
|
||||||
|
will create a ZVOL and format the volume accordingly. FsType can
|
||||||
|
not be modified once volume has been provisioned. Default Value:
|
||||||
|
ext4.'
|
||||||
|
type: string
|
||||||
|
keyformat:
|
||||||
|
description: KeyFormat specifies format of the encryption key The
|
||||||
|
supported KeyFormats are passphrase, raw, hex.
|
||||||
|
enum:
|
||||||
|
- passphrase
|
||||||
|
- raw
|
||||||
|
- hex
|
||||||
|
type: string
|
||||||
|
keylocation:
|
||||||
|
description: KeyLocation is the location of key for the encryption
|
||||||
|
type: string
|
||||||
|
ownerNodeID:
|
||||||
|
description: OwnerNodeID is the Node ID where the ZPOOL is running
|
||||||
|
which is where the volume has been provisioned. OwnerNodeID can
|
||||||
|
not be edited after the volume has been provisioned.
|
||||||
|
minLength: 1
|
||||||
|
type: string
|
||||||
|
poolName:
|
||||||
|
description: poolName specifies the name of the pool where the volume
|
||||||
|
has been created. PoolName can not be edited after the volume has
|
||||||
|
been provisioned.
|
||||||
|
minLength: 1
|
||||||
|
type: string
|
||||||
|
recordsize:
|
||||||
|
description: 'Specifies a suggested block size for files in the file
|
||||||
|
system. The size specified must be a power of two greater than or
|
||||||
|
equal to 512 and less than or equal to 128 Kbytes. RecordSize property
|
||||||
|
can be edited after the volume has been created. Changing the file
|
||||||
|
system''s recordsize affects only files created afterward; existing
|
||||||
|
files are unaffected. Default Value: 128k.'
|
||||||
|
minLength: 1
|
||||||
|
type: string
|
||||||
|
snapname:
|
||||||
|
description: SnapName specifies the name of the snapshot where the
|
||||||
|
volume has been cloned from. Snapname can not be edited after the
|
||||||
|
volume has been provisioned.
|
||||||
|
type: string
|
||||||
|
thinProvision:
|
||||||
|
description: 'ThinProvision describes whether space reservation for
|
||||||
|
the source volume is required or not. The value "yes" indicates
|
||||||
|
that volume should be thin provisioned and "no" means thick provisioning
|
||||||
|
of the volume. If thinProvision is set to "yes" then volume can
|
||||||
|
be provisioned even if the ZPOOL does not have the enough capacity.
|
||||||
|
If thinProvision is set to "no" then volume can be provisioned only
|
||||||
|
if the ZPOOL has enough capacity and capacity required by volume
|
||||||
|
can be reserved. ThinProvision can not be modified once volume has
|
||||||
|
been provisioned. Default Value: no.'
|
||||||
|
enum:
|
||||||
|
- "yes"
|
||||||
|
- "no"
|
||||||
|
type: string
|
||||||
|
volblocksize:
|
||||||
|
description: 'VolBlockSize specifies the block size for the zvol.
|
||||||
|
The volsize can only be set to a multiple of volblocksize, and cannot
|
||||||
|
be zero. VolBlockSize can not be edited after the volume has been
|
||||||
|
provisioned. Default Value: 8k.'
|
||||||
|
minLength: 1
|
||||||
|
type: string
|
||||||
|
volumeType:
|
||||||
|
description: volumeType determines whether the volume is of type "DATASET"
|
||||||
|
or "ZVOL". If fstype provided in the storageclass is "zfs", a volume
|
||||||
|
of type dataset will be created. If "ext4", "ext3", "ext2" or "xfs"
|
||||||
|
is mentioned as fstype in the storageclass, then a volume of type
|
||||||
|
zvol will be created, which will be further formatted as the fstype
|
||||||
|
provided in the storageclass. VolumeType can not be modified once
|
||||||
|
volume has been provisioned.
|
||||||
|
enum:
|
||||||
|
- ZVOL
|
||||||
|
- DATASET
|
||||||
|
type: string
|
||||||
|
required:
|
||||||
|
- capacity
|
||||||
|
- ownerNodeID
|
||||||
|
- poolName
|
||||||
|
- volumeType
|
||||||
|
type: object
|
||||||
|
status:
|
||||||
|
properties:
|
||||||
|
state:
|
||||||
|
type: string
|
||||||
|
type: object
|
||||||
|
required:
|
||||||
|
- spec
|
||||||
|
- status
|
||||||
|
type: object
|
||||||
served: true
|
served: true
|
||||||
storage: false
|
storage: false
|
||||||
status:
|
status:
|
||||||
|
|
|
||||||
|
|
@ -56,7 +56,10 @@ spec:
|
||||||
preserveUnknownFields: false
|
preserveUnknownFields: false
|
||||||
scope: Namespaced
|
scope: Namespaced
|
||||||
subresources: {}
|
subresources: {}
|
||||||
validation:
|
version: v1
|
||||||
|
versions:
|
||||||
|
- name: v1
|
||||||
|
schema:
|
||||||
openAPIV3Schema:
|
openAPIV3Schema:
|
||||||
description: ZFSVolume represents a ZFS based volume
|
description: ZFSVolume represents a ZFS based volume
|
||||||
properties:
|
properties:
|
||||||
|
|
@ -73,12 +76,13 @@ spec:
|
||||||
metadata:
|
metadata:
|
||||||
type: object
|
type: object
|
||||||
spec:
|
spec:
|
||||||
description: VolumeInfo defines ZFS volume parameters for all modes in which
|
description: VolumeInfo defines ZFS volume parameters for all modes in
|
||||||
ZFS volumes can be created like - ZFS volume with filesystem, ZFS Volume
|
which ZFS volumes can be created like - ZFS volume with filesystem,
|
||||||
exposed as zfs or ZFS volume exposed as raw block device. Some of the
|
ZFS Volume exposed as zfs or ZFS volume exposed as raw block device.
|
||||||
parameters can be only set during creation time (as specified in the details
|
Some of the parameters can be only set during creation time (as specified
|
||||||
of the parameter), and a few are editable. In case of Cloned volumes,
|
in the details of the parameter), and a few are editable. In case of
|
||||||
the parameters are assigned the same values as the source volume.
|
Cloned volumes, the parameters are assigned the same values as the source
|
||||||
|
volume.
|
||||||
properties:
|
properties:
|
||||||
capacity:
|
capacity:
|
||||||
description: Capacity of the volume
|
description: Capacity of the volume
|
||||||
|
|
@ -86,56 +90,57 @@ spec:
|
||||||
type: string
|
type: string
|
||||||
compression:
|
compression:
|
||||||
description: 'Compression specifies the block-level compression algorithm
|
description: 'Compression specifies the block-level compression algorithm
|
||||||
to be applied to the ZFS Volume. The value "on" indicates ZFS to use
|
to be applied to the ZFS Volume. The value "on" indicates ZFS to
|
||||||
the default compression algorithm. The default compression algorithm
|
use the default compression algorithm. The default compression algorithm
|
||||||
used by ZFS will be either lzjb or, if the lz4_compress feature is
|
used by ZFS will be either lzjb or, if the lz4_compress feature
|
||||||
enabled, lz4. Compression property can be edited after the volume
|
is enabled, lz4. Compression property can be edited after the volume
|
||||||
has been created. The change will only be applied to the newly-written
|
has been created. The change will only be applied to the newly-written
|
||||||
data. For instance, if the Volume was created with "off" and the next
|
data. For instance, if the Volume was created with "off" and the
|
||||||
day the compression was modified to "on", the data written prior to
|
next day the compression was modified to "on", the data written
|
||||||
setting "on" will not be compressed. Default Value: off.'
|
prior to setting "on" will not be compressed. Default Value: off.'
|
||||||
pattern: ^(on|off|lzjb|gzip|gzip-[1-9]|zle|lz4)$
|
pattern: ^(on|off|lzjb|gzip|gzip-[1-9]|zle|lz4)$
|
||||||
type: string
|
type: string
|
||||||
dedup:
|
dedup:
|
||||||
description: 'Deduplication is the process for removing redundant data
|
description: 'Deduplication is the process for removing redundant
|
||||||
at the block level, reducing the total amount of data stored. If a
|
data at the block level, reducing the total amount of data stored.
|
||||||
file system has the dedup property enabled, duplicate data blocks
|
If a file system has the dedup property enabled, duplicate data
|
||||||
are removed synchronously. The result is that only unique data is
|
blocks are removed synchronously. The result is that only unique
|
||||||
stored and common components are shared among files. Deduplication
|
data is stored and common components are shared among files. Deduplication
|
||||||
can consume significant processing power (CPU) and memory as well
|
can consume significant processing power (CPU) and memory as well
|
||||||
as generate additional disk IO. Before creating a pool with deduplication
|
as generate additional disk IO. Before creating a pool with deduplication
|
||||||
enabled, ensure that you have planned your hardware requirements appropriately
|
enabled, ensure that you have planned your hardware requirements
|
||||||
and implemented appropriate recovery practices, such as regular backups.
|
appropriately and implemented appropriate recovery practices, such
|
||||||
As an alternative to deduplication consider using compression=lz4,
|
as regular backups. As an alternative to deduplication consider
|
||||||
as a less resource-intensive alternative. should be enabled on the
|
using compression=lz4, as a less resource-intensive alternative.
|
||||||
zvol. Dedup property can be edited after the volume has been created.
|
should be enabled on the zvol. Dedup property can be edited after
|
||||||
Default Value: off.'
|
the volume has been created. Default Value: off.'
|
||||||
enum:
|
enum:
|
||||||
- "on"
|
- "on"
|
||||||
- "off"
|
- "off"
|
||||||
type: string
|
type: string
|
||||||
encryption:
|
encryption:
|
||||||
description: 'Enabling the encryption feature allows for the creation
|
description: 'Enabling the encryption feature allows for the creation
|
||||||
of encrypted filesystems and volumes. ZFS will encrypt file and zvol
|
of encrypted filesystems and volumes. ZFS will encrypt file and
|
||||||
data, file attributes, ACLs, permission bits, directory listings,
|
zvol data, file attributes, ACLs, permission bits, directory listings,
|
||||||
FUID mappings, and userused / groupused data. ZFS will not encrypt
|
FUID mappings, and userused / groupused data. ZFS will not encrypt
|
||||||
metadata related to the pool structure, including dataset and snapshot
|
metadata related to the pool structure, including dataset and snapshot
|
||||||
names, dataset hierarchy, properties, file size, file holes, and deduplication
|
names, dataset hierarchy, properties, file size, file holes, and
|
||||||
tables (though the deduplicated data itself is encrypted). Default
|
deduplication tables (though the deduplicated data itself is encrypted).
|
||||||
Value: off.'
|
Default Value: off.'
|
||||||
pattern: ^(on|off|aes-128-[c,g]cm|aes-192-[c,g]cm|aes-256-[c,g]cm)$
|
pattern: ^(on|off|aes-128-[c,g]cm|aes-192-[c,g]cm|aes-256-[c,g]cm)$
|
||||||
type: string
|
type: string
|
||||||
fsType:
|
fsType:
|
||||||
description: 'FsType specifies filesystem type for the zfs volume/dataset.
|
description: 'FsType specifies filesystem type for the zfs volume/dataset.
|
||||||
If FsType is provided as "zfs", then the driver will create a ZFS
|
If FsType is provided as "zfs", then the driver will create a ZFS
|
||||||
dataset, formatting is not required as underlying filesystem is ZFS
|
dataset, formatting is not required as underlying filesystem is
|
||||||
anyway. If FsType is ext2, ext3, ext4 or xfs, then the driver will
|
ZFS anyway. If FsType is ext2, ext3, ext4 or xfs, then the driver
|
||||||
create a ZVOL and format the volume accordingly. FsType can not be
|
will create a ZVOL and format the volume accordingly. FsType can
|
||||||
modified once volume has been provisioned. Default Value: ext4.'
|
not be modified once volume has been provisioned. Default Value:
|
||||||
|
ext4.'
|
||||||
type: string
|
type: string
|
||||||
keyformat:
|
keyformat:
|
||||||
description: KeyFormat specifies format of the encryption key The supported
|
description: KeyFormat specifies format of the encryption key The
|
||||||
KeyFormats are passphrase, raw, hex.
|
supported KeyFormats are passphrase, raw, hex.
|
||||||
enum:
|
enum:
|
||||||
- passphrase
|
- passphrase
|
||||||
- raw
|
- raw
|
||||||
|
|
@ -145,9 +150,9 @@ spec:
|
||||||
description: KeyLocation is the location of key for the encryption
|
description: KeyLocation is the location of key for the encryption
|
||||||
type: string
|
type: string
|
||||||
ownerNodeID:
|
ownerNodeID:
|
||||||
description: OwnerNodeID is the Node ID where the ZPOOL is running which
|
description: OwnerNodeID is the Node ID where the ZPOOL is running
|
||||||
is where the volume has been provisioned. OwnerNodeID can not be edited
|
which is where the volume has been provisioned. OwnerNodeID can
|
||||||
after the volume has been provisioned.
|
not be edited after the volume has been provisioned.
|
||||||
minLength: 1
|
minLength: 1
|
||||||
type: string
|
type: string
|
||||||
poolName:
|
poolName:
|
||||||
|
|
@ -165,28 +170,36 @@ spec:
|
||||||
files are unaffected. Default Value: 128k.'
|
files are unaffected. Default Value: 128k.'
|
||||||
minLength: 1
|
minLength: 1
|
||||||
type: string
|
type: string
|
||||||
|
shared:
|
||||||
|
description: Shared specifies whether the volume can be shared among
|
||||||
|
multiple pods. If it is not set to "yes", then the ZFS-LocalPV Driver
|
||||||
|
will not allow the volumes to be mounted by more than one pods.
|
||||||
|
enum:
|
||||||
|
- "yes"
|
||||||
|
- "no"
|
||||||
|
type: string
|
||||||
snapname:
|
snapname:
|
||||||
description: SnapName specifies the name of the snapshot where the volume
|
description: SnapName specifies the name of the snapshot where the
|
||||||
has been cloned from. Snapname can not be edited after the volume
|
volume has been cloned from. Snapname can not be edited after the
|
||||||
has been provisioned.
|
volume has been provisioned.
|
||||||
type: string
|
type: string
|
||||||
thinProvision:
|
thinProvision:
|
||||||
description: 'ThinProvision describes whether space reservation for
|
description: 'ThinProvision describes whether space reservation for
|
||||||
the source volume is required or not. The value "yes" indicates that
|
the source volume is required or not. The value "yes" indicates
|
||||||
volume should be thin provisioned and "no" means thick provisioning
|
that volume should be thin provisioned and "no" means thick provisioning
|
||||||
of the volume. If thinProvision is set to "yes" then volume can be
|
of the volume. If thinProvision is set to "yes" then volume can
|
||||||
provisioned even if the ZPOOL does not have the enough capacity. If
|
be provisioned even if the ZPOOL does not have the enough capacity.
|
||||||
thinProvision is set to "no" then volume can be provisioned only if
|
If thinProvision is set to "no" then volume can be provisioned only
|
||||||
the ZPOOL has enough capacity and capacity required by volume can
|
if the ZPOOL has enough capacity and capacity required by volume
|
||||||
be reserved. ThinProvision can not be modified once volume has been
|
can be reserved. ThinProvision can not be modified once volume has
|
||||||
provisioned. Default Value: no.'
|
been provisioned. Default Value: no.'
|
||||||
enum:
|
enum:
|
||||||
- "yes"
|
- "yes"
|
||||||
- "no"
|
- "no"
|
||||||
type: string
|
type: string
|
||||||
volblocksize:
|
volblocksize:
|
||||||
description: 'VolBlockSize specifies the block size for the zvol. The
|
description: 'VolBlockSize specifies the block size for the zvol.
|
||||||
volsize can only be set to a multiple of volblocksize, and cannot
|
The volsize can only be set to a multiple of volblocksize, and cannot
|
||||||
be zero. VolBlockSize can not be edited after the volume has been
|
be zero. VolBlockSize can not be edited after the volume has been
|
||||||
provisioned. Default Value: 8k.'
|
provisioned. Default Value: 8k.'
|
||||||
minLength: 1
|
minLength: 1
|
||||||
|
|
@ -224,12 +237,179 @@ spec:
|
||||||
required:
|
required:
|
||||||
- spec
|
- spec
|
||||||
type: object
|
type: object
|
||||||
version: v1
|
|
||||||
versions:
|
|
||||||
- name: v1
|
|
||||||
served: true
|
served: true
|
||||||
storage: true
|
storage: true
|
||||||
- name: v1alpha1
|
- name: v1alpha1
|
||||||
|
schema:
|
||||||
|
openAPIV3Schema:
|
||||||
|
description: ZFSVolume represents a ZFS based volume
|
||||||
|
properties:
|
||||||
|
apiVersion:
|
||||||
|
description: 'APIVersion defines the versioned schema of this representation
|
||||||
|
of an object. Servers should convert recognized schemas to the latest
|
||||||
|
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources'
|
||||||
|
type: string
|
||||||
|
kind:
|
||||||
|
description: 'Kind is a string value representing the REST resource this
|
||||||
|
object represents. Servers may infer this from the endpoint the client
|
||||||
|
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds'
|
||||||
|
type: string
|
||||||
|
metadata:
|
||||||
|
type: object
|
||||||
|
spec:
|
||||||
|
description: VolumeInfo defines ZFS volume parameters for all modes in
|
||||||
|
which ZFS volumes can be created like - ZFS volume with filesystem,
|
||||||
|
ZFS Volume exposed as zfs or ZFS volume exposed as raw block device.
|
||||||
|
Some of the parameters can be only set during creation time (as specified
|
||||||
|
in the details of the parameter), and a few are editable. In case of
|
||||||
|
Cloned volumes, the parameters are assigned the same values as the source
|
||||||
|
volume.
|
||||||
|
properties:
|
||||||
|
capacity:
|
||||||
|
description: Capacity of the volume
|
||||||
|
minLength: 1
|
||||||
|
type: string
|
||||||
|
compression:
|
||||||
|
description: 'Compression specifies the block-level compression algorithm
|
||||||
|
to be applied to the ZFS Volume. The value "on" indicates ZFS to
|
||||||
|
use the default compression algorithm. The default compression algorithm
|
||||||
|
used by ZFS will be either lzjb or, if the lz4_compress feature
|
||||||
|
is enabled, lz4. Compression property can be edited after the volume
|
||||||
|
has been created. The change will only be applied to the newly-written
|
||||||
|
data. For instance, if the Volume was created with "off" and the
|
||||||
|
next day the compression was modified to "on", the data written
|
||||||
|
prior to setting "on" will not be compressed. Default Value: off.'
|
||||||
|
pattern: ^(on|off|lzjb|gzip|gzip-[1-9]|zle|lz4)$
|
||||||
|
type: string
|
||||||
|
dedup:
|
||||||
|
description: 'Deduplication is the process for removing redundant
|
||||||
|
data at the block level, reducing the total amount of data stored.
|
||||||
|
If a file system has the dedup property enabled, duplicate data
|
||||||
|
blocks are removed synchronously. The result is that only unique
|
||||||
|
data is stored and common components are shared among files. Deduplication
|
||||||
|
can consume significant processing power (CPU) and memory as well
|
||||||
|
as generate additional disk IO. Before creating a pool with deduplication
|
||||||
|
enabled, ensure that you have planned your hardware requirements
|
||||||
|
appropriately and implemented appropriate recovery practices, such
|
||||||
|
as regular backups. As an alternative to deduplication consider
|
||||||
|
using compression=lz4, as a less resource-intensive alternative.
|
||||||
|
should be enabled on the zvol. Dedup property can be edited after
|
||||||
|
the volume has been created. Default Value: off.'
|
||||||
|
enum:
|
||||||
|
- "on"
|
||||||
|
- "off"
|
||||||
|
type: string
|
||||||
|
encryption:
|
||||||
|
description: 'Enabling the encryption feature allows for the creation
|
||||||
|
of encrypted filesystems and volumes. ZFS will encrypt file and
|
||||||
|
zvol data, file attributes, ACLs, permission bits, directory listings,
|
||||||
|
FUID mappings, and userused / groupused data. ZFS will not encrypt
|
||||||
|
metadata related to the pool structure, including dataset and snapshot
|
||||||
|
names, dataset hierarchy, properties, file size, file holes, and
|
||||||
|
deduplication tables (though the deduplicated data itself is encrypted).
|
||||||
|
Default Value: off.'
|
||||||
|
pattern: ^(on|off|aes-128-[c,g]cm|aes-192-[c,g]cm|aes-256-[c,g]cm)$
|
||||||
|
type: string
|
||||||
|
fsType:
|
||||||
|
description: 'FsType specifies filesystem type for the zfs volume/dataset.
|
||||||
|
If FsType is provided as "zfs", then the driver will create a ZFS
|
||||||
|
dataset, formatting is not required as underlying filesystem is
|
||||||
|
ZFS anyway. If FsType is ext2, ext3, ext4 or xfs, then the driver
|
||||||
|
will create a ZVOL and format the volume accordingly. FsType can
|
||||||
|
not be modified once volume has been provisioned. Default Value:
|
||||||
|
ext4.'
|
||||||
|
type: string
|
||||||
|
keyformat:
|
||||||
|
description: KeyFormat specifies format of the encryption key The
|
||||||
|
supported KeyFormats are passphrase, raw, hex.
|
||||||
|
enum:
|
||||||
|
- passphrase
|
||||||
|
- raw
|
||||||
|
- hex
|
||||||
|
type: string
|
||||||
|
keylocation:
|
||||||
|
description: KeyLocation is the location of key for the encryption
|
||||||
|
type: string
|
||||||
|
ownerNodeID:
|
||||||
|
description: OwnerNodeID is the Node ID where the ZPOOL is running
|
||||||
|
which is where the volume has been provisioned. OwnerNodeID can
|
||||||
|
not be edited after the volume has been provisioned.
|
||||||
|
minLength: 1
|
||||||
|
type: string
|
||||||
|
poolName:
|
||||||
|
description: poolName specifies the name of the pool where the volume
|
||||||
|
has been created. PoolName can not be edited after the volume has
|
||||||
|
been provisioned.
|
||||||
|
minLength: 1
|
||||||
|
type: string
|
||||||
|
recordsize:
|
||||||
|
description: 'Specifies a suggested block size for files in the file
|
||||||
|
system. The size specified must be a power of two greater than or
|
||||||
|
equal to 512 and less than or equal to 128 Kbytes. RecordSize property
|
||||||
|
can be edited after the volume has been created. Changing the file
|
||||||
|
system''s recordsize affects only files created afterward; existing
|
||||||
|
files are unaffected. Default Value: 128k.'
|
||||||
|
minLength: 1
|
||||||
|
type: string
|
||||||
|
snapname:
|
||||||
|
description: SnapName specifies the name of the snapshot where the
|
||||||
|
volume has been cloned from. Snapname can not be edited after the
|
||||||
|
volume has been provisioned.
|
||||||
|
type: string
|
||||||
|
thinProvision:
|
||||||
|
description: 'ThinProvision describes whether space reservation for
|
||||||
|
the source volume is required or not. The value "yes" indicates
|
||||||
|
that volume should be thin provisioned and "no" means thick provisioning
|
||||||
|
of the volume. If thinProvision is set to "yes" then volume can
|
||||||
|
be provisioned even if the ZPOOL does not have the enough capacity.
|
||||||
|
If thinProvision is set to "no" then volume can be provisioned only
|
||||||
|
if the ZPOOL has enough capacity and capacity required by volume
|
||||||
|
can be reserved. ThinProvision can not be modified once volume has
|
||||||
|
been provisioned. Default Value: no.'
|
||||||
|
enum:
|
||||||
|
- "yes"
|
||||||
|
- "no"
|
||||||
|
type: string
|
||||||
|
volblocksize:
|
||||||
|
description: 'VolBlockSize specifies the block size for the zvol.
|
||||||
|
The volsize can only be set to a multiple of volblocksize, and cannot
|
||||||
|
be zero. VolBlockSize can not be edited after the volume has been
|
||||||
|
provisioned. Default Value: 8k.'
|
||||||
|
minLength: 1
|
||||||
|
type: string
|
||||||
|
volumeType:
|
||||||
|
description: volumeType determines whether the volume is of type "DATASET"
|
||||||
|
or "ZVOL". If fstype provided in the storageclass is "zfs", a volume
|
||||||
|
of type dataset will be created. If "ext4", "ext3", "ext2" or "xfs"
|
||||||
|
is mentioned as fstype in the storageclass, then a volume of type
|
||||||
|
zvol will be created, which will be further formatted as the fstype
|
||||||
|
provided in the storageclass. VolumeType can not be modified once
|
||||||
|
volume has been provisioned.
|
||||||
|
enum:
|
||||||
|
- ZVOL
|
||||||
|
- DATASET
|
||||||
|
type: string
|
||||||
|
required:
|
||||||
|
- capacity
|
||||||
|
- ownerNodeID
|
||||||
|
- poolName
|
||||||
|
- volumeType
|
||||||
|
type: object
|
||||||
|
status:
|
||||||
|
properties:
|
||||||
|
state:
|
||||||
|
description: State specifies the current state of the volume provisioning
|
||||||
|
request. The state "Pending" means that the volume creation request
|
||||||
|
has not processed yet. The state "Ready" means that the volume has
|
||||||
|
been created and it is ready for the use.
|
||||||
|
enum:
|
||||||
|
- Pending
|
||||||
|
- Ready
|
||||||
|
type: string
|
||||||
|
type: object
|
||||||
|
required:
|
||||||
|
- spec
|
||||||
|
type: object
|
||||||
served: true
|
served: true
|
||||||
storage: false
|
storage: false
|
||||||
status:
|
status:
|
||||||
|
|
|
||||||
|
|
@ -77,7 +77,10 @@ spec:
|
||||||
preserveUnknownFields: false
|
preserveUnknownFields: false
|
||||||
scope: Namespaced
|
scope: Namespaced
|
||||||
subresources: {}
|
subresources: {}
|
||||||
validation:
|
version: v1
|
||||||
|
versions:
|
||||||
|
- name: v1
|
||||||
|
schema:
|
||||||
openAPIV3Schema:
|
openAPIV3Schema:
|
||||||
description: ZFSVolume represents a ZFS based volume
|
description: ZFSVolume represents a ZFS based volume
|
||||||
properties:
|
properties:
|
||||||
|
|
@ -94,12 +97,13 @@ spec:
|
||||||
metadata:
|
metadata:
|
||||||
type: object
|
type: object
|
||||||
spec:
|
spec:
|
||||||
description: VolumeInfo defines ZFS volume parameters for all modes in which
|
description: VolumeInfo defines ZFS volume parameters for all modes in
|
||||||
ZFS volumes can be created like - ZFS volume with filesystem, ZFS Volume
|
which ZFS volumes can be created like - ZFS volume with filesystem,
|
||||||
exposed as zfs or ZFS volume exposed as raw block device. Some of the
|
ZFS Volume exposed as zfs or ZFS volume exposed as raw block device.
|
||||||
parameters can be only set during creation time (as specified in the details
|
Some of the parameters can be only set during creation time (as specified
|
||||||
of the parameter), and a few are editable. In case of Cloned volumes,
|
in the details of the parameter), and a few are editable. In case of
|
||||||
the parameters are assigned the same values as the source volume.
|
Cloned volumes, the parameters are assigned the same values as the source
|
||||||
|
volume.
|
||||||
properties:
|
properties:
|
||||||
capacity:
|
capacity:
|
||||||
description: Capacity of the volume
|
description: Capacity of the volume
|
||||||
|
|
@ -107,56 +111,57 @@ spec:
|
||||||
type: string
|
type: string
|
||||||
compression:
|
compression:
|
||||||
description: 'Compression specifies the block-level compression algorithm
|
description: 'Compression specifies the block-level compression algorithm
|
||||||
to be applied to the ZFS Volume. The value "on" indicates ZFS to use
|
to be applied to the ZFS Volume. The value "on" indicates ZFS to
|
||||||
the default compression algorithm. The default compression algorithm
|
use the default compression algorithm. The default compression algorithm
|
||||||
used by ZFS will be either lzjb or, if the lz4_compress feature is
|
used by ZFS will be either lzjb or, if the lz4_compress feature
|
||||||
enabled, lz4. Compression property can be edited after the volume
|
is enabled, lz4. Compression property can be edited after the volume
|
||||||
has been created. The change will only be applied to the newly-written
|
has been created. The change will only be applied to the newly-written
|
||||||
data. For instance, if the Volume was created with "off" and the next
|
data. For instance, if the Volume was created with "off" and the
|
||||||
day the compression was modified to "on", the data written prior to
|
next day the compression was modified to "on", the data written
|
||||||
setting "on" will not be compressed. Default Value: off.'
|
prior to setting "on" will not be compressed. Default Value: off.'
|
||||||
pattern: ^(on|off|lzjb|gzip|gzip-[1-9]|zle|lz4)$
|
pattern: ^(on|off|lzjb|gzip|gzip-[1-9]|zle|lz4)$
|
||||||
type: string
|
type: string
|
||||||
dedup:
|
dedup:
|
||||||
description: 'Deduplication is the process for removing redundant data
|
description: 'Deduplication is the process for removing redundant
|
||||||
at the block level, reducing the total amount of data stored. If a
|
data at the block level, reducing the total amount of data stored.
|
||||||
file system has the dedup property enabled, duplicate data blocks
|
If a file system has the dedup property enabled, duplicate data
|
||||||
are removed synchronously. The result is that only unique data is
|
blocks are removed synchronously. The result is that only unique
|
||||||
stored and common components are shared among files. Deduplication
|
data is stored and common components are shared among files. Deduplication
|
||||||
can consume significant processing power (CPU) and memory as well
|
can consume significant processing power (CPU) and memory as well
|
||||||
as generate additional disk IO. Before creating a pool with deduplication
|
as generate additional disk IO. Before creating a pool with deduplication
|
||||||
enabled, ensure that you have planned your hardware requirements appropriately
|
enabled, ensure that you have planned your hardware requirements
|
||||||
and implemented appropriate recovery practices, such as regular backups.
|
appropriately and implemented appropriate recovery practices, such
|
||||||
As an alternative to deduplication consider using compression=lz4,
|
as regular backups. As an alternative to deduplication consider
|
||||||
as a less resource-intensive alternative. should be enabled on the
|
using compression=lz4, as a less resource-intensive alternative.
|
||||||
zvol. Dedup property can be edited after the volume has been created.
|
should be enabled on the zvol. Dedup property can be edited after
|
||||||
Default Value: off.'
|
the volume has been created. Default Value: off.'
|
||||||
enum:
|
enum:
|
||||||
- "on"
|
- "on"
|
||||||
- "off"
|
- "off"
|
||||||
type: string
|
type: string
|
||||||
encryption:
|
encryption:
|
||||||
description: 'Enabling the encryption feature allows for the creation
|
description: 'Enabling the encryption feature allows for the creation
|
||||||
of encrypted filesystems and volumes. ZFS will encrypt file and zvol
|
of encrypted filesystems and volumes. ZFS will encrypt file and
|
||||||
data, file attributes, ACLs, permission bits, directory listings,
|
zvol data, file attributes, ACLs, permission bits, directory listings,
|
||||||
FUID mappings, and userused / groupused data. ZFS will not encrypt
|
FUID mappings, and userused / groupused data. ZFS will not encrypt
|
||||||
metadata related to the pool structure, including dataset and snapshot
|
metadata related to the pool structure, including dataset and snapshot
|
||||||
names, dataset hierarchy, properties, file size, file holes, and deduplication
|
names, dataset hierarchy, properties, file size, file holes, and
|
||||||
tables (though the deduplicated data itself is encrypted). Default
|
deduplication tables (though the deduplicated data itself is encrypted).
|
||||||
Value: off.'
|
Default Value: off.'
|
||||||
pattern: ^(on|off|aes-128-[c,g]cm|aes-192-[c,g]cm|aes-256-[c,g]cm)$
|
pattern: ^(on|off|aes-128-[c,g]cm|aes-192-[c,g]cm|aes-256-[c,g]cm)$
|
||||||
type: string
|
type: string
|
||||||
fsType:
|
fsType:
|
||||||
description: 'FsType specifies filesystem type for the zfs volume/dataset.
|
description: 'FsType specifies filesystem type for the zfs volume/dataset.
|
||||||
If FsType is provided as "zfs", then the driver will create a ZFS
|
If FsType is provided as "zfs", then the driver will create a ZFS
|
||||||
dataset, formatting is not required as underlying filesystem is ZFS
|
dataset, formatting is not required as underlying filesystem is
|
||||||
anyway. If FsType is ext2, ext3, ext4 or xfs, then the driver will
|
ZFS anyway. If FsType is ext2, ext3, ext4 or xfs, then the driver
|
||||||
create a ZVOL and format the volume accordingly. FsType can not be
|
will create a ZVOL and format the volume accordingly. FsType can
|
||||||
modified once volume has been provisioned. Default Value: ext4.'
|
not be modified once volume has been provisioned. Default Value:
|
||||||
|
ext4.'
|
||||||
type: string
|
type: string
|
||||||
keyformat:
|
keyformat:
|
||||||
description: KeyFormat specifies format of the encryption key The supported
|
description: KeyFormat specifies format of the encryption key The
|
||||||
KeyFormats are passphrase, raw, hex.
|
supported KeyFormats are passphrase, raw, hex.
|
||||||
enum:
|
enum:
|
||||||
- passphrase
|
- passphrase
|
||||||
- raw
|
- raw
|
||||||
|
|
@ -166,9 +171,9 @@ spec:
|
||||||
description: KeyLocation is the location of key for the encryption
|
description: KeyLocation is the location of key for the encryption
|
||||||
type: string
|
type: string
|
||||||
ownerNodeID:
|
ownerNodeID:
|
||||||
description: OwnerNodeID is the Node ID where the ZPOOL is running which
|
description: OwnerNodeID is the Node ID where the ZPOOL is running
|
||||||
is where the volume has been provisioned. OwnerNodeID can not be edited
|
which is where the volume has been provisioned. OwnerNodeID can
|
||||||
after the volume has been provisioned.
|
not be edited after the volume has been provisioned.
|
||||||
minLength: 1
|
minLength: 1
|
||||||
type: string
|
type: string
|
||||||
poolName:
|
poolName:
|
||||||
|
|
@ -186,28 +191,36 @@ spec:
|
||||||
files are unaffected. Default Value: 128k.'
|
files are unaffected. Default Value: 128k.'
|
||||||
minLength: 1
|
minLength: 1
|
||||||
type: string
|
type: string
|
||||||
|
shared:
|
||||||
|
description: Shared specifies whether the volume can be shared among
|
||||||
|
multiple pods. If it is not set to "yes", then the ZFS-LocalPV Driver
|
||||||
|
will not allow the volumes to be mounted by more than one pods.
|
||||||
|
enum:
|
||||||
|
- "yes"
|
||||||
|
- "no"
|
||||||
|
type: string
|
||||||
snapname:
|
snapname:
|
||||||
description: SnapName specifies the name of the snapshot where the volume
|
description: SnapName specifies the name of the snapshot where the
|
||||||
has been cloned from. Snapname can not be edited after the volume
|
volume has been cloned from. Snapname can not be edited after the
|
||||||
has been provisioned.
|
volume has been provisioned.
|
||||||
type: string
|
type: string
|
||||||
thinProvision:
|
thinProvision:
|
||||||
description: 'ThinProvision describes whether space reservation for
|
description: 'ThinProvision describes whether space reservation for
|
||||||
the source volume is required or not. The value "yes" indicates that
|
the source volume is required or not. The value "yes" indicates
|
||||||
volume should be thin provisioned and "no" means thick provisioning
|
that volume should be thin provisioned and "no" means thick provisioning
|
||||||
of the volume. If thinProvision is set to "yes" then volume can be
|
of the volume. If thinProvision is set to "yes" then volume can
|
||||||
provisioned even if the ZPOOL does not have the enough capacity. If
|
be provisioned even if the ZPOOL does not have the enough capacity.
|
||||||
thinProvision is set to "no" then volume can be provisioned only if
|
If thinProvision is set to "no" then volume can be provisioned only
|
||||||
the ZPOOL has enough capacity and capacity required by volume can
|
if the ZPOOL has enough capacity and capacity required by volume
|
||||||
be reserved. ThinProvision can not be modified once volume has been
|
can be reserved. ThinProvision can not be modified once volume has
|
||||||
provisioned. Default Value: no.'
|
been provisioned. Default Value: no.'
|
||||||
enum:
|
enum:
|
||||||
- "yes"
|
- "yes"
|
||||||
- "no"
|
- "no"
|
||||||
type: string
|
type: string
|
||||||
volblocksize:
|
volblocksize:
|
||||||
description: 'VolBlockSize specifies the block size for the zvol. The
|
description: 'VolBlockSize specifies the block size for the zvol.
|
||||||
volsize can only be set to a multiple of volblocksize, and cannot
|
The volsize can only be set to a multiple of volblocksize, and cannot
|
||||||
be zero. VolBlockSize can not be edited after the volume has been
|
be zero. VolBlockSize can not be edited after the volume has been
|
||||||
provisioned. Default Value: 8k.'
|
provisioned. Default Value: 8k.'
|
||||||
minLength: 1
|
minLength: 1
|
||||||
|
|
@ -245,12 +258,179 @@ spec:
|
||||||
required:
|
required:
|
||||||
- spec
|
- spec
|
||||||
type: object
|
type: object
|
||||||
version: v1
|
|
||||||
versions:
|
|
||||||
- name: v1
|
|
||||||
served: true
|
served: true
|
||||||
storage: true
|
storage: true
|
||||||
- name: v1alpha1
|
- name: v1alpha1
|
||||||
|
schema:
|
||||||
|
openAPIV3Schema:
|
||||||
|
description: ZFSVolume represents a ZFS based volume
|
||||||
|
properties:
|
||||||
|
apiVersion:
|
||||||
|
description: 'APIVersion defines the versioned schema of this representation
|
||||||
|
of an object. Servers should convert recognized schemas to the latest
|
||||||
|
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources'
|
||||||
|
type: string
|
||||||
|
kind:
|
||||||
|
description: 'Kind is a string value representing the REST resource this
|
||||||
|
object represents. Servers may infer this from the endpoint the client
|
||||||
|
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds'
|
||||||
|
type: string
|
||||||
|
metadata:
|
||||||
|
type: object
|
||||||
|
spec:
|
||||||
|
description: VolumeInfo defines ZFS volume parameters for all modes in
|
||||||
|
which ZFS volumes can be created like - ZFS volume with filesystem,
|
||||||
|
ZFS Volume exposed as zfs or ZFS volume exposed as raw block device.
|
||||||
|
Some of the parameters can be only set during creation time (as specified
|
||||||
|
in the details of the parameter), and a few are editable. In case of
|
||||||
|
Cloned volumes, the parameters are assigned the same values as the source
|
||||||
|
volume.
|
||||||
|
properties:
|
||||||
|
capacity:
|
||||||
|
description: Capacity of the volume
|
||||||
|
minLength: 1
|
||||||
|
type: string
|
||||||
|
compression:
|
||||||
|
description: 'Compression specifies the block-level compression algorithm
|
||||||
|
to be applied to the ZFS Volume. The value "on" indicates ZFS to
|
||||||
|
use the default compression algorithm. The default compression algorithm
|
||||||
|
used by ZFS will be either lzjb or, if the lz4_compress feature
|
||||||
|
is enabled, lz4. Compression property can be edited after the volume
|
||||||
|
has been created. The change will only be applied to the newly-written
|
||||||
|
data. For instance, if the Volume was created with "off" and the
|
||||||
|
next day the compression was modified to "on", the data written
|
||||||
|
prior to setting "on" will not be compressed. Default Value: off.'
|
||||||
|
pattern: ^(on|off|lzjb|gzip|gzip-[1-9]|zle|lz4)$
|
||||||
|
type: string
|
||||||
|
dedup:
|
||||||
|
description: 'Deduplication is the process for removing redundant
|
||||||
|
data at the block level, reducing the total amount of data stored.
|
||||||
|
If a file system has the dedup property enabled, duplicate data
|
||||||
|
blocks are removed synchronously. The result is that only unique
|
||||||
|
data is stored and common components are shared among files. Deduplication
|
||||||
|
can consume significant processing power (CPU) and memory as well
|
||||||
|
as generate additional disk IO. Before creating a pool with deduplication
|
||||||
|
enabled, ensure that you have planned your hardware requirements
|
||||||
|
appropriately and implemented appropriate recovery practices, such
|
||||||
|
as regular backups. As an alternative to deduplication consider
|
||||||
|
using compression=lz4, as a less resource-intensive alternative.
|
||||||
|
should be enabled on the zvol. Dedup property can be edited after
|
||||||
|
the volume has been created. Default Value: off.'
|
||||||
|
enum:
|
||||||
|
- "on"
|
||||||
|
- "off"
|
||||||
|
type: string
|
||||||
|
encryption:
|
||||||
|
description: 'Enabling the encryption feature allows for the creation
|
||||||
|
of encrypted filesystems and volumes. ZFS will encrypt file and
|
||||||
|
zvol data, file attributes, ACLs, permission bits, directory listings,
|
||||||
|
FUID mappings, and userused / groupused data. ZFS will not encrypt
|
||||||
|
metadata related to the pool structure, including dataset and snapshot
|
||||||
|
names, dataset hierarchy, properties, file size, file holes, and
|
||||||
|
deduplication tables (though the deduplicated data itself is encrypted).
|
||||||
|
Default Value: off.'
|
||||||
|
pattern: ^(on|off|aes-128-[c,g]cm|aes-192-[c,g]cm|aes-256-[c,g]cm)$
|
||||||
|
type: string
|
||||||
|
fsType:
|
||||||
|
description: 'FsType specifies filesystem type for the zfs volume/dataset.
|
||||||
|
If FsType is provided as "zfs", then the driver will create a ZFS
|
||||||
|
dataset, formatting is not required as underlying filesystem is
|
||||||
|
ZFS anyway. If FsType is ext2, ext3, ext4 or xfs, then the driver
|
||||||
|
will create a ZVOL and format the volume accordingly. FsType can
|
||||||
|
not be modified once volume has been provisioned. Default Value:
|
||||||
|
ext4.'
|
||||||
|
type: string
|
||||||
|
keyformat:
|
||||||
|
description: KeyFormat specifies format of the encryption key The
|
||||||
|
supported KeyFormats are passphrase, raw, hex.
|
||||||
|
enum:
|
||||||
|
- passphrase
|
||||||
|
- raw
|
||||||
|
- hex
|
||||||
|
type: string
|
||||||
|
keylocation:
|
||||||
|
description: KeyLocation is the location of key for the encryption
|
||||||
|
type: string
|
||||||
|
ownerNodeID:
|
||||||
|
description: OwnerNodeID is the Node ID where the ZPOOL is running
|
||||||
|
which is where the volume has been provisioned. OwnerNodeID can
|
||||||
|
not be edited after the volume has been provisioned.
|
||||||
|
minLength: 1
|
||||||
|
type: string
|
||||||
|
poolName:
|
||||||
|
description: poolName specifies the name of the pool where the volume
|
||||||
|
has been created. PoolName can not be edited after the volume has
|
||||||
|
been provisioned.
|
||||||
|
minLength: 1
|
||||||
|
type: string
|
||||||
|
recordsize:
|
||||||
|
description: 'Specifies a suggested block size for files in the file
|
||||||
|
system. The size specified must be a power of two greater than or
|
||||||
|
equal to 512 and less than or equal to 128 Kbytes. RecordSize property
|
||||||
|
can be edited after the volume has been created. Changing the file
|
||||||
|
system''s recordsize affects only files created afterward; existing
|
||||||
|
files are unaffected. Default Value: 128k.'
|
||||||
|
minLength: 1
|
||||||
|
type: string
|
||||||
|
snapname:
|
||||||
|
description: SnapName specifies the name of the snapshot where the
|
||||||
|
volume has been cloned from. Snapname can not be edited after the
|
||||||
|
volume has been provisioned.
|
||||||
|
type: string
|
||||||
|
thinProvision:
|
||||||
|
description: 'ThinProvision describes whether space reservation for
|
||||||
|
the source volume is required or not. The value "yes" indicates
|
||||||
|
that volume should be thin provisioned and "no" means thick provisioning
|
||||||
|
of the volume. If thinProvision is set to "yes" then volume can
|
||||||
|
be provisioned even if the ZPOOL does not have the enough capacity.
|
||||||
|
If thinProvision is set to "no" then volume can be provisioned only
|
||||||
|
if the ZPOOL has enough capacity and capacity required by volume
|
||||||
|
can be reserved. ThinProvision can not be modified once volume has
|
||||||
|
been provisioned. Default Value: no.'
|
||||||
|
enum:
|
||||||
|
- "yes"
|
||||||
|
- "no"
|
||||||
|
type: string
|
||||||
|
volblocksize:
|
||||||
|
description: 'VolBlockSize specifies the block size for the zvol.
|
||||||
|
The volsize can only be set to a multiple of volblocksize, and cannot
|
||||||
|
be zero. VolBlockSize can not be edited after the volume has been
|
||||||
|
provisioned. Default Value: 8k.'
|
||||||
|
minLength: 1
|
||||||
|
type: string
|
||||||
|
volumeType:
|
||||||
|
description: volumeType determines whether the volume is of type "DATASET"
|
||||||
|
or "ZVOL". If fstype provided in the storageclass is "zfs", a volume
|
||||||
|
of type dataset will be created. If "ext4", "ext3", "ext2" or "xfs"
|
||||||
|
is mentioned as fstype in the storageclass, then a volume of type
|
||||||
|
zvol will be created, which will be further formatted as the fstype
|
||||||
|
provided in the storageclass. VolumeType can not be modified once
|
||||||
|
volume has been provisioned.
|
||||||
|
enum:
|
||||||
|
- ZVOL
|
||||||
|
- DATASET
|
||||||
|
type: string
|
||||||
|
required:
|
||||||
|
- capacity
|
||||||
|
- ownerNodeID
|
||||||
|
- poolName
|
||||||
|
- volumeType
|
||||||
|
type: object
|
||||||
|
status:
|
||||||
|
properties:
|
||||||
|
state:
|
||||||
|
description: State specifies the current state of the volume provisioning
|
||||||
|
request. The state "Pending" means that the volume creation request
|
||||||
|
has not processed yet. The state "Ready" means that the volume has
|
||||||
|
been created and it is ready for the use.
|
||||||
|
enum:
|
||||||
|
- Pending
|
||||||
|
- Ready
|
||||||
|
type: string
|
||||||
|
type: object
|
||||||
|
required:
|
||||||
|
- spec
|
||||||
|
type: object
|
||||||
served: true
|
served: true
|
||||||
storage: false
|
storage: false
|
||||||
status:
|
status:
|
||||||
|
|
@ -290,7 +470,10 @@ spec:
|
||||||
singular: zfssnapshot
|
singular: zfssnapshot
|
||||||
preserveUnknownFields: false
|
preserveUnknownFields: false
|
||||||
scope: Namespaced
|
scope: Namespaced
|
||||||
validation:
|
version: v1
|
||||||
|
versions:
|
||||||
|
- name: v1
|
||||||
|
schema:
|
||||||
openAPIV3Schema:
|
openAPIV3Schema:
|
||||||
description: ZFSSnapshot represents a ZFS Snapshot of the zfsvolume
|
description: ZFSSnapshot represents a ZFS Snapshot of the zfsvolume
|
||||||
properties:
|
properties:
|
||||||
|
|
@ -307,12 +490,13 @@ spec:
|
||||||
metadata:
|
metadata:
|
||||||
type: object
|
type: object
|
||||||
spec:
|
spec:
|
||||||
description: VolumeInfo defines ZFS volume parameters for all modes in which
|
description: VolumeInfo defines ZFS volume parameters for all modes in
|
||||||
ZFS volumes can be created like - ZFS volume with filesystem, ZFS Volume
|
which ZFS volumes can be created like - ZFS volume with filesystem,
|
||||||
exposed as zfs or ZFS volume exposed as raw block device. Some of the
|
ZFS Volume exposed as zfs or ZFS volume exposed as raw block device.
|
||||||
parameters can be only set during creation time (as specified in the details
|
Some of the parameters can be only set during creation time (as specified
|
||||||
of the parameter), and a few are editable. In case of Cloned volumes,
|
in the details of the parameter), and a few are editable. In case of
|
||||||
the parameters are assigned the same values as the source volume.
|
Cloned volumes, the parameters are assigned the same values as the source
|
||||||
|
volume.
|
||||||
properties:
|
properties:
|
||||||
capacity:
|
capacity:
|
||||||
description: Capacity of the volume
|
description: Capacity of the volume
|
||||||
|
|
@ -320,56 +504,57 @@ spec:
|
||||||
type: string
|
type: string
|
||||||
compression:
|
compression:
|
||||||
description: 'Compression specifies the block-level compression algorithm
|
description: 'Compression specifies the block-level compression algorithm
|
||||||
to be applied to the ZFS Volume. The value "on" indicates ZFS to use
|
to be applied to the ZFS Volume. The value "on" indicates ZFS to
|
||||||
the default compression algorithm. The default compression algorithm
|
use the default compression algorithm. The default compression algorithm
|
||||||
used by ZFS will be either lzjb or, if the lz4_compress feature is
|
used by ZFS will be either lzjb or, if the lz4_compress feature
|
||||||
enabled, lz4. Compression property can be edited after the volume
|
is enabled, lz4. Compression property can be edited after the volume
|
||||||
has been created. The change will only be applied to the newly-written
|
has been created. The change will only be applied to the newly-written
|
||||||
data. For instance, if the Volume was created with "off" and the next
|
data. For instance, if the Volume was created with "off" and the
|
||||||
day the compression was modified to "on", the data written prior to
|
next day the compression was modified to "on", the data written
|
||||||
setting "on" will not be compressed. Default Value: off.'
|
prior to setting "on" will not be compressed. Default Value: off.'
|
||||||
pattern: ^(on|off|lzjb|gzip|gzip-[1-9]|zle|lz4)$
|
pattern: ^(on|off|lzjb|gzip|gzip-[1-9]|zle|lz4)$
|
||||||
type: string
|
type: string
|
||||||
dedup:
|
dedup:
|
||||||
description: 'Deduplication is the process for removing redundant data
|
description: 'Deduplication is the process for removing redundant
|
||||||
at the block level, reducing the total amount of data stored. If a
|
data at the block level, reducing the total amount of data stored.
|
||||||
file system has the dedup property enabled, duplicate data blocks
|
If a file system has the dedup property enabled, duplicate data
|
||||||
are removed synchronously. The result is that only unique data is
|
blocks are removed synchronously. The result is that only unique
|
||||||
stored and common components are shared among files. Deduplication
|
data is stored and common components are shared among files. Deduplication
|
||||||
can consume significant processing power (CPU) and memory as well
|
can consume significant processing power (CPU) and memory as well
|
||||||
as generate additional disk IO. Before creating a pool with deduplication
|
as generate additional disk IO. Before creating a pool with deduplication
|
||||||
enabled, ensure that you have planned your hardware requirements appropriately
|
enabled, ensure that you have planned your hardware requirements
|
||||||
and implemented appropriate recovery practices, such as regular backups.
|
appropriately and implemented appropriate recovery practices, such
|
||||||
As an alternative to deduplication consider using compression=lz4,
|
as regular backups. As an alternative to deduplication consider
|
||||||
as a less resource-intensive alternative. should be enabled on the
|
using compression=lz4, as a less resource-intensive alternative.
|
||||||
zvol. Dedup property can be edited after the volume has been created.
|
should be enabled on the zvol. Dedup property can be edited after
|
||||||
Default Value: off.'
|
the volume has been created. Default Value: off.'
|
||||||
enum:
|
enum:
|
||||||
- "on"
|
- "on"
|
||||||
- "off"
|
- "off"
|
||||||
type: string
|
type: string
|
||||||
encryption:
|
encryption:
|
||||||
description: 'Enabling the encryption feature allows for the creation
|
description: 'Enabling the encryption feature allows for the creation
|
||||||
of encrypted filesystems and volumes. ZFS will encrypt file and zvol
|
of encrypted filesystems and volumes. ZFS will encrypt file and
|
||||||
data, file attributes, ACLs, permission bits, directory listings,
|
zvol data, file attributes, ACLs, permission bits, directory listings,
|
||||||
FUID mappings, and userused / groupused data. ZFS will not encrypt
|
FUID mappings, and userused / groupused data. ZFS will not encrypt
|
||||||
metadata related to the pool structure, including dataset and snapshot
|
metadata related to the pool structure, including dataset and snapshot
|
||||||
names, dataset hierarchy, properties, file size, file holes, and deduplication
|
names, dataset hierarchy, properties, file size, file holes, and
|
||||||
tables (though the deduplicated data itself is encrypted). Default
|
deduplication tables (though the deduplicated data itself is encrypted).
|
||||||
Value: off.'
|
Default Value: off.'
|
||||||
pattern: ^(on|off|aes-128-[c,g]cm|aes-192-[c,g]cm|aes-256-[c,g]cm)$
|
pattern: ^(on|off|aes-128-[c,g]cm|aes-192-[c,g]cm|aes-256-[c,g]cm)$
|
||||||
type: string
|
type: string
|
||||||
fsType:
|
fsType:
|
||||||
description: 'FsType specifies filesystem type for the zfs volume/dataset.
|
description: 'FsType specifies filesystem type for the zfs volume/dataset.
|
||||||
If FsType is provided as "zfs", then the driver will create a ZFS
|
If FsType is provided as "zfs", then the driver will create a ZFS
|
||||||
dataset, formatting is not required as underlying filesystem is ZFS
|
dataset, formatting is not required as underlying filesystem is
|
||||||
anyway. If FsType is ext2, ext3, ext4 or xfs, then the driver will
|
ZFS anyway. If FsType is ext2, ext3, ext4 or xfs, then the driver
|
||||||
create a ZVOL and format the volume accordingly. FsType can not be
|
will create a ZVOL and format the volume accordingly. FsType can
|
||||||
modified once volume has been provisioned. Default Value: ext4.'
|
not be modified once volume has been provisioned. Default Value:
|
||||||
|
ext4.'
|
||||||
type: string
|
type: string
|
||||||
keyformat:
|
keyformat:
|
||||||
description: KeyFormat specifies format of the encryption key The supported
|
description: KeyFormat specifies format of the encryption key The
|
||||||
KeyFormats are passphrase, raw, hex.
|
supported KeyFormats are passphrase, raw, hex.
|
||||||
enum:
|
enum:
|
||||||
- passphrase
|
- passphrase
|
||||||
- raw
|
- raw
|
||||||
|
|
@ -379,9 +564,9 @@ spec:
|
||||||
description: KeyLocation is the location of key for the encryption
|
description: KeyLocation is the location of key for the encryption
|
||||||
type: string
|
type: string
|
||||||
ownerNodeID:
|
ownerNodeID:
|
||||||
description: OwnerNodeID is the Node ID where the ZPOOL is running which
|
description: OwnerNodeID is the Node ID where the ZPOOL is running
|
||||||
is where the volume has been provisioned. OwnerNodeID can not be edited
|
which is where the volume has been provisioned. OwnerNodeID can
|
||||||
after the volume has been provisioned.
|
not be edited after the volume has been provisioned.
|
||||||
minLength: 1
|
minLength: 1
|
||||||
type: string
|
type: string
|
||||||
poolName:
|
poolName:
|
||||||
|
|
@ -399,28 +584,36 @@ spec:
|
||||||
files are unaffected. Default Value: 128k.'
|
files are unaffected. Default Value: 128k.'
|
||||||
minLength: 1
|
minLength: 1
|
||||||
type: string
|
type: string
|
||||||
|
shared:
|
||||||
|
description: Shared specifies whether the volume can be shared among
|
||||||
|
multiple pods. If it is not set to "yes", then the ZFS-LocalPV Driver
|
||||||
|
will not allow the volumes to be mounted by more than one pods.
|
||||||
|
enum:
|
||||||
|
- "yes"
|
||||||
|
- "no"
|
||||||
|
type: string
|
||||||
snapname:
|
snapname:
|
||||||
description: SnapName specifies the name of the snapshot where the volume
|
description: SnapName specifies the name of the snapshot where the
|
||||||
has been cloned from. Snapname can not be edited after the volume
|
volume has been cloned from. Snapname can not be edited after the
|
||||||
has been provisioned.
|
volume has been provisioned.
|
||||||
type: string
|
type: string
|
||||||
thinProvision:
|
thinProvision:
|
||||||
description: 'ThinProvision describes whether space reservation for
|
description: 'ThinProvision describes whether space reservation for
|
||||||
the source volume is required or not. The value "yes" indicates that
|
the source volume is required or not. The value "yes" indicates
|
||||||
volume should be thin provisioned and "no" means thick provisioning
|
that volume should be thin provisioned and "no" means thick provisioning
|
||||||
of the volume. If thinProvision is set to "yes" then volume can be
|
of the volume. If thinProvision is set to "yes" then volume can
|
||||||
provisioned even if the ZPOOL does not have the enough capacity. If
|
be provisioned even if the ZPOOL does not have the enough capacity.
|
||||||
thinProvision is set to "no" then volume can be provisioned only if
|
If thinProvision is set to "no" then volume can be provisioned only
|
||||||
the ZPOOL has enough capacity and capacity required by volume can
|
if the ZPOOL has enough capacity and capacity required by volume
|
||||||
be reserved. ThinProvision can not be modified once volume has been
|
can be reserved. ThinProvision can not be modified once volume has
|
||||||
provisioned. Default Value: no.'
|
been provisioned. Default Value: no.'
|
||||||
enum:
|
enum:
|
||||||
- "yes"
|
- "yes"
|
||||||
- "no"
|
- "no"
|
||||||
type: string
|
type: string
|
||||||
volblocksize:
|
volblocksize:
|
||||||
description: 'VolBlockSize specifies the block size for the zvol. The
|
description: 'VolBlockSize specifies the block size for the zvol.
|
||||||
volsize can only be set to a multiple of volblocksize, and cannot
|
The volsize can only be set to a multiple of volblocksize, and cannot
|
||||||
be zero. VolBlockSize can not be edited after the volume has been
|
be zero. VolBlockSize can not be edited after the volume has been
|
||||||
provisioned. Default Value: 8k.'
|
provisioned. Default Value: 8k.'
|
||||||
minLength: 1
|
minLength: 1
|
||||||
|
|
@ -452,12 +645,173 @@ spec:
|
||||||
- spec
|
- spec
|
||||||
- status
|
- status
|
||||||
type: object
|
type: object
|
||||||
version: v1
|
|
||||||
versions:
|
|
||||||
- name: v1
|
|
||||||
served: true
|
served: true
|
||||||
storage: true
|
storage: true
|
||||||
- name: v1alpha1
|
- name: v1alpha1
|
||||||
|
schema:
|
||||||
|
openAPIV3Schema:
|
||||||
|
description: ZFSSnapshot represents a ZFS Snapshot of the zfsvolume
|
||||||
|
properties:
|
||||||
|
apiVersion:
|
||||||
|
description: 'APIVersion defines the versioned schema of this representation
|
||||||
|
of an object. Servers should convert recognized schemas to the latest
|
||||||
|
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources'
|
||||||
|
type: string
|
||||||
|
kind:
|
||||||
|
description: 'Kind is a string value representing the REST resource this
|
||||||
|
object represents. Servers may infer this from the endpoint the client
|
||||||
|
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds'
|
||||||
|
type: string
|
||||||
|
metadata:
|
||||||
|
type: object
|
||||||
|
spec:
|
||||||
|
description: VolumeInfo defines ZFS volume parameters for all modes in
|
||||||
|
which ZFS volumes can be created like - ZFS volume with filesystem,
|
||||||
|
ZFS Volume exposed as zfs or ZFS volume exposed as raw block device.
|
||||||
|
Some of the parameters can be only set during creation time (as specified
|
||||||
|
in the details of the parameter), and a few are editable. In case of
|
||||||
|
Cloned volumes, the parameters are assigned the same values as the source
|
||||||
|
volume.
|
||||||
|
properties:
|
||||||
|
capacity:
|
||||||
|
description: Capacity of the volume
|
||||||
|
minLength: 1
|
||||||
|
type: string
|
||||||
|
compression:
|
||||||
|
description: 'Compression specifies the block-level compression algorithm
|
||||||
|
to be applied to the ZFS Volume. The value "on" indicates ZFS to
|
||||||
|
use the default compression algorithm. The default compression algorithm
|
||||||
|
used by ZFS will be either lzjb or, if the lz4_compress feature
|
||||||
|
is enabled, lz4. Compression property can be edited after the volume
|
||||||
|
has been created. The change will only be applied to the newly-written
|
||||||
|
data. For instance, if the Volume was created with "off" and the
|
||||||
|
next day the compression was modified to "on", the data written
|
||||||
|
prior to setting "on" will not be compressed. Default Value: off.'
|
||||||
|
pattern: ^(on|off|lzjb|gzip|gzip-[1-9]|zle|lz4)$
|
||||||
|
type: string
|
||||||
|
dedup:
|
||||||
|
description: 'Deduplication is the process for removing redundant
|
||||||
|
data at the block level, reducing the total amount of data stored.
|
||||||
|
If a file system has the dedup property enabled, duplicate data
|
||||||
|
blocks are removed synchronously. The result is that only unique
|
||||||
|
data is stored and common components are shared among files. Deduplication
|
||||||
|
can consume significant processing power (CPU) and memory as well
|
||||||
|
as generate additional disk IO. Before creating a pool with deduplication
|
||||||
|
enabled, ensure that you have planned your hardware requirements
|
||||||
|
appropriately and implemented appropriate recovery practices, such
|
||||||
|
as regular backups. As an alternative to deduplication consider
|
||||||
|
using compression=lz4, as a less resource-intensive alternative.
|
||||||
|
should be enabled on the zvol. Dedup property can be edited after
|
||||||
|
the volume has been created. Default Value: off.'
|
||||||
|
enum:
|
||||||
|
- "on"
|
||||||
|
- "off"
|
||||||
|
type: string
|
||||||
|
encryption:
|
||||||
|
description: 'Enabling the encryption feature allows for the creation
|
||||||
|
of encrypted filesystems and volumes. ZFS will encrypt file and
|
||||||
|
zvol data, file attributes, ACLs, permission bits, directory listings,
|
||||||
|
FUID mappings, and userused / groupused data. ZFS will not encrypt
|
||||||
|
metadata related to the pool structure, including dataset and snapshot
|
||||||
|
names, dataset hierarchy, properties, file size, file holes, and
|
||||||
|
deduplication tables (though the deduplicated data itself is encrypted).
|
||||||
|
Default Value: off.'
|
||||||
|
pattern: ^(on|off|aes-128-[c,g]cm|aes-192-[c,g]cm|aes-256-[c,g]cm)$
|
||||||
|
type: string
|
||||||
|
fsType:
|
||||||
|
description: 'FsType specifies filesystem type for the zfs volume/dataset.
|
||||||
|
If FsType is provided as "zfs", then the driver will create a ZFS
|
||||||
|
dataset, formatting is not required as underlying filesystem is
|
||||||
|
ZFS anyway. If FsType is ext2, ext3, ext4 or xfs, then the driver
|
||||||
|
will create a ZVOL and format the volume accordingly. FsType can
|
||||||
|
not be modified once volume has been provisioned. Default Value:
|
||||||
|
ext4.'
|
||||||
|
type: string
|
||||||
|
keyformat:
|
||||||
|
description: KeyFormat specifies format of the encryption key The
|
||||||
|
supported KeyFormats are passphrase, raw, hex.
|
||||||
|
enum:
|
||||||
|
- passphrase
|
||||||
|
- raw
|
||||||
|
- hex
|
||||||
|
type: string
|
||||||
|
keylocation:
|
||||||
|
description: KeyLocation is the location of key for the encryption
|
||||||
|
type: string
|
||||||
|
ownerNodeID:
|
||||||
|
description: OwnerNodeID is the Node ID where the ZPOOL is running
|
||||||
|
which is where the volume has been provisioned. OwnerNodeID can
|
||||||
|
not be edited after the volume has been provisioned.
|
||||||
|
minLength: 1
|
||||||
|
type: string
|
||||||
|
poolName:
|
||||||
|
description: poolName specifies the name of the pool where the volume
|
||||||
|
has been created. PoolName can not be edited after the volume has
|
||||||
|
been provisioned.
|
||||||
|
minLength: 1
|
||||||
|
type: string
|
||||||
|
recordsize:
|
||||||
|
description: 'Specifies a suggested block size for files in the file
|
||||||
|
system. The size specified must be a power of two greater than or
|
||||||
|
equal to 512 and less than or equal to 128 Kbytes. RecordSize property
|
||||||
|
can be edited after the volume has been created. Changing the file
|
||||||
|
system''s recordsize affects only files created afterward; existing
|
||||||
|
files are unaffected. Default Value: 128k.'
|
||||||
|
minLength: 1
|
||||||
|
type: string
|
||||||
|
snapname:
|
||||||
|
description: SnapName specifies the name of the snapshot where the
|
||||||
|
volume has been cloned from. Snapname can not be edited after the
|
||||||
|
volume has been provisioned.
|
||||||
|
type: string
|
||||||
|
thinProvision:
|
||||||
|
description: 'ThinProvision describes whether space reservation for
|
||||||
|
the source volume is required or not. The value "yes" indicates
|
||||||
|
that volume should be thin provisioned and "no" means thick provisioning
|
||||||
|
of the volume. If thinProvision is set to "yes" then volume can
|
||||||
|
be provisioned even if the ZPOOL does not have the enough capacity.
|
||||||
|
If thinProvision is set to "no" then volume can be provisioned only
|
||||||
|
if the ZPOOL has enough capacity and capacity required by volume
|
||||||
|
can be reserved. ThinProvision can not be modified once volume has
|
||||||
|
been provisioned. Default Value: no.'
|
||||||
|
enum:
|
||||||
|
- "yes"
|
||||||
|
- "no"
|
||||||
|
type: string
|
||||||
|
volblocksize:
|
||||||
|
description: 'VolBlockSize specifies the block size for the zvol.
|
||||||
|
The volsize can only be set to a multiple of volblocksize, and cannot
|
||||||
|
be zero. VolBlockSize can not be edited after the volume has been
|
||||||
|
provisioned. Default Value: 8k.'
|
||||||
|
minLength: 1
|
||||||
|
type: string
|
||||||
|
volumeType:
|
||||||
|
description: volumeType determines whether the volume is of type "DATASET"
|
||||||
|
or "ZVOL". If fstype provided in the storageclass is "zfs", a volume
|
||||||
|
of type dataset will be created. If "ext4", "ext3", "ext2" or "xfs"
|
||||||
|
is mentioned as fstype in the storageclass, then a volume of type
|
||||||
|
zvol will be created, which will be further formatted as the fstype
|
||||||
|
provided in the storageclass. VolumeType can not be modified once
|
||||||
|
volume has been provisioned.
|
||||||
|
enum:
|
||||||
|
- ZVOL
|
||||||
|
- DATASET
|
||||||
|
type: string
|
||||||
|
required:
|
||||||
|
- capacity
|
||||||
|
- ownerNodeID
|
||||||
|
- poolName
|
||||||
|
- volumeType
|
||||||
|
type: object
|
||||||
|
status:
|
||||||
|
properties:
|
||||||
|
state:
|
||||||
|
type: string
|
||||||
|
type: object
|
||||||
|
required:
|
||||||
|
- spec
|
||||||
|
- status
|
||||||
|
type: object
|
||||||
served: true
|
served: true
|
||||||
storage: false
|
storage: false
|
||||||
status:
|
status:
|
||||||
|
|
|
||||||
|
|
@ -193,6 +193,13 @@ type VolumeInfo struct {
|
||||||
// FsType can not be modified once volume has been provisioned.
|
// FsType can not be modified once volume has been provisioned.
|
||||||
// Default Value: ext4.
|
// Default Value: ext4.
|
||||||
FsType string `json:"fsType,omitempty"`
|
FsType string `json:"fsType,omitempty"`
|
||||||
|
|
||||||
|
// Shared specifies whether the volume can be shared among multiple pods.
|
||||||
|
// If it is not set to "yes", then the ZFS-LocalPV Driver will not allow
|
||||||
|
// the volumes to be mounted by more than one pods.
|
||||||
|
// +kubebuilder:validation:Required
|
||||||
|
// +kubebuilder:validation:Enum=yes;no
|
||||||
|
Shared string `json:"shared,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type VolStatus struct {
|
type VolStatus struct {
|
||||||
|
|
|
||||||
|
|
@ -172,6 +172,12 @@ func (b *Builder) WithFsType(fstype string) *Builder {
|
||||||
return b
|
return b
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// WithShared sets where filesystem is shared or not
|
||||||
|
func (b *Builder) WithShared(shared string) *Builder {
|
||||||
|
b.volume.Object.Spec.Shared = shared
|
||||||
|
return b
|
||||||
|
}
|
||||||
|
|
||||||
// WithSnapshot sets Snapshot name for creating clone volume
|
// WithSnapshot sets Snapshot name for creating clone volume
|
||||||
func (b *Builder) WithSnapshot(snap string) *Builder {
|
func (b *Builder) WithSnapshot(snap string) *Builder {
|
||||||
b.volume.Object.Spec.SnapName = snap
|
b.volume.Object.Spec.SnapName = snap
|
||||||
|
|
|
||||||
|
|
@ -98,6 +98,7 @@ func CreateZFSVolume(req *csi.CreateVolumeRequest) (string, error) {
|
||||||
tp := parameters["thinprovision"]
|
tp := parameters["thinprovision"]
|
||||||
schld := parameters["scheduler"]
|
schld := parameters["scheduler"]
|
||||||
fstype := parameters["fstype"]
|
fstype := parameters["fstype"]
|
||||||
|
shared := parameters["shared"]
|
||||||
|
|
||||||
vtype := zfs.GetVolumeType(fstype)
|
vtype := zfs.GetVolumeType(fstype)
|
||||||
|
|
||||||
|
|
@ -124,6 +125,7 @@ func CreateZFSVolume(req *csi.CreateVolumeRequest) (string, error) {
|
||||||
WithVolumeType(vtype).
|
WithVolumeType(vtype).
|
||||||
WithVolumeStatus(zfs.ZFSStatusPending).
|
WithVolumeStatus(zfs.ZFSStatusPending).
|
||||||
WithFsType(fstype).
|
WithFsType(fstype).
|
||||||
|
WithShared(shared).
|
||||||
WithCompression(compression).Build()
|
WithCompression(compression).Build()
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
|
||||||
|
|
@ -69,7 +69,7 @@ func logGRPC(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, h
|
||||||
|
|
||||||
log := isInfotrmativeLog(info.FullMethod)
|
log := isInfotrmativeLog(info.FullMethod)
|
||||||
if log == true {
|
if log == true {
|
||||||
klog.Infof("GRPC call: %s\n requests %s", info.FullMethod, protosanitizer.StripSecrets(req))
|
klog.Infof("GRPC call: %s requests %s", info.FullMethod, protosanitizer.StripSecrets(req))
|
||||||
}
|
}
|
||||||
|
|
||||||
resp, err := handler(ctx, req)
|
resp, err := handler(ctx, req)
|
||||||
|
|
|
||||||
|
|
@ -147,6 +147,8 @@ func verifyMountRequest(vol *apis.ZFSVolume, mountpath string) error {
|
||||||
return status.Errorf(codes.Internal, "verifyMount: GetVolumePath failed %s", err.Error())
|
return status.Errorf(codes.Internal, "verifyMount: GetVolumePath failed %s", err.Error())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// if it is not a shared volume, then make sure it is not mounted to more than one path
|
||||||
|
if vol.Spec.Shared != "yes" {
|
||||||
/*
|
/*
|
||||||
* This check is the famous *Wall Of North*
|
* This check is the famous *Wall Of North*
|
||||||
* It will not let the volume to be mounted
|
* It will not let the volume to be mounted
|
||||||
|
|
@ -166,6 +168,7 @@ func verifyMountRequest(vol *apis.ZFSVolume, mountpath string) error {
|
||||||
)
|
)
|
||||||
return status.Errorf(codes.Internal, "verifyMount: device already mounted at %s", currentMounts)
|
return status.Errorf(codes.Internal, "verifyMount: device already mounted at %s", currentMounts)
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue