Commit graph

4 commits

Author SHA1 Message Date
Pawan
6c410553d2 feat(attach): avoid creation of volumeattachment object
k8s is very slow in attaching the volumes when dealing with the
large number of volume attachment object.

(k8s issue https://github.com/kubernetes/kubernetes/issues/84169)

The volumeattachment is not required for ZFSPV, so avoid creation
of attachment object, also removed the csi-attacher container as
this is also not needed as it acts on volumeattachment object.

k8s is very slow in attaching the volumes when dealing with the
large number of volume attachment object :

k8s issue https://github.com/kubernetes/kubernetes/issues/84169).

Volumeattachment is a CR created just to tell the watcher of it
which is csi-attacher, that it has to call the Controller Publish/Unpublish grpc.
Which does all the tasks to attach the volumes to a node for example call to the
DigitalOcean Block Storage API service to attach a created volume to a specified node.
Since for ZFSPV, volume is already present locally, nothing needs to done in Controller
Publish/Unpublish, so it is good to remove them.

so avoiding creation of attachment object in this change, also removed the csi-attacher
container as this is also not needed as it acts on volumeattachment object.

Removed csi-cluster-driver-registrar container also as it is deprecated and not needed anymore.

We are using csidriver beta CRDs so minimum k8s version required is 1.14+.

Signed-off-by: Pawan <pawan@mayadata.io>
2020-04-27 20:18:42 +05:30
Aman Gupta
7a3cbae3f1 Added readme file for upgrade scripts of refactoring CRDs
Signed-off-by: Aman Gupta <aman.gupta@mayadata.io>
2020-04-15 14:02:20 +05:30
Pawan Prakash Sharma
ae724ee096
feat(validation): adding validation for ZFSPV CR parameters (#66)
Validating few parameters for the ZFSVolume custom resource

- compression can be "on", "off", "lzjb", "gzip", "gzip-[1-9]", "zle" and "lz4"
- encryption can be "on", "off", "aes-128-ccm", "aes-192-ccm", "aes-256-ccm", "aes-128-gcm", "aes-192-gcm", and "aes-256-gcm"
- dedup can be "on" and "off"
- poolname can be string
- ownernodeid can be string
- thinprovision can be "yes" and "no"
- volumetype can be "DATASET" and "ZVOL"

Also added required fields needed to create ZFSVolume CR
- ownerNodeID
- poolname
- volumeType
- capacity


Signed-off-by: Pawan <pawan@mayadata.io>
2020-04-14 17:26:46 +05:30
Pawan Prakash Sharma
8a9ac43ab5
feat(crd): scripts to help migrating to new CRDs (#73)
The CRDs have changed from being under openebs.io to zfs.openebs.io. 

The scripts in this commit and the following steps will help users migrate existing CRDs to new CRDs and clean up older CRDs. 

# upgrade to new CRD
1. apply the crd yaml
    `$ kubectl apply -f upgrade/crd.yaml`

2. run upgrade.sh
    `$ upgrade/upgrade.sh`

3. upgrade the driver to v0.6
    `$ kubectl apply -f https://github.com/openebs/zfs-localpv/blob/v0.6.x/deploy/zfs-operator.yaml`

4. if everything looks good run the cleanup.sh, it will clean old CRs and delete the CRD
    `$ upgrade/cleanup.sh`

Signed-off-by: Pawan <pawan@mayadata.io>
2020-04-01 13:53:13 +05:30