mirror of
https://github.com/TECHNOFAB11/zfs-localpv.git
synced 2025-12-12 14:30:12 +01:00
feat(ZFSPV): adding encryption in ZFSVolume CR (#6)
Adding support for enabling encryption using a custom key. Also, adding support to inherit the properties from ZPOOL which are not listed in the storage class, ZFS driver will not pass default values while creating the volume. Those properties will be inherited from the ZPOOL. we can use the encryption option in storage class ``` apiVersion: storage.k8s.io/v1 kind: StorageClass metadata: name: openebs-zfspv allowVolumeExpansion: true parameters: blocksize: "4k" compression: "on" dedup: "on" thinprovision: "yes" encryption: "on" keyformat: "raw" keylocation: "file:///home/keys/key" poolname: "zfspv-pool" provisioner: openebs.io/zfs ``` Just a note, the key file should be mounted inside the node-agent container so that we can use that file while provisioning the volume. keyformat can be raw, hex or passphrase. Signed-off-by: Pawan <pawan@mayadata.io>
This commit is contained in:
parent
cc6ff6c520
commit
0218dacea0
7 changed files with 288 additions and 68 deletions
|
|
@ -91,9 +91,21 @@ type VolumeInfo struct {
|
|||
Compression string `json:"compression"`
|
||||
|
||||
// Dedup specifies the deduplication
|
||||
// should be enabledd on the zvol
|
||||
// should be enabled on the zvol
|
||||
Dedup string `json:"dedup"`
|
||||
|
||||
// Encryption specifies the encryption
|
||||
// should be enabled on the zvol
|
||||
Encryption string `json:"encryption"`
|
||||
|
||||
// KeyLocation is the location of key
|
||||
// for the encryption
|
||||
KeyLocation string `json:"keylocation"`
|
||||
|
||||
// KeyFormat specifies format of the
|
||||
// encryption key
|
||||
KeyFormat string `json:"keyformat"`
|
||||
|
||||
// Thinprovision specifies if we should
|
||||
// thin provisioned the volume or not
|
||||
ThinProvision string `json:"thinProvison"`
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue