Commit graph

21 commits

Author SHA1 Message Date
Pawan
c9ea713333 chore(yaml): removing centos yamls from the repo
Now we have the same operator yaml which can work for all
OS distro. We don't need to have OS specific Operator yamls.

Signed-off-by: Pawan <pawan@mayadata.io>
2020-09-16 21:09:10 +05:30
ajeet_rai
27fe7e3b06
chore(check): Add license-check for .go , .sh , Dockerfile and Makefile (#205)
Signed-off-by: ajeetrai707 <ajeetrai707@gmail.com>
2020-09-08 20:37:59 +05:30
Pawan Prakash Sharma
e40026c98a
feat(zfspv): adding backup and restore support (#162)
This commit adds support for Backup and Restore controller, which will be watching for
the events. The velero plugin will create a Backup CR to create a backup
with the remote location information, the controller will send the data
to that remote location.

In the same way, the velero plugin will create a Restore CR to restore the
volume from the the remote location and the restore controller will restore
the data.

Steps to use velero plugin for ZFS-LocalPV are :

1. install velero

2. add openebs plugin

velero plugin add openebs/velero-plugin:latest

3. Create the volumesnapshot location :

for full backup :-

```yaml
apiVersion: velero.io/v1
kind: VolumeSnapshotLocation
metadata:
  name: default
  namespace: velero
spec:
  provider: openebs.io/zfspv-blockstore
  config:
    bucket: velero
    prefix: zfs
    namespace: openebs
    provider: aws
    region: minio
    s3ForcePathStyle: "true"
    s3Url: http://minio.velero.svc:9000
```

for incremental backup :-

```yaml
apiVersion: velero.io/v1
kind: VolumeSnapshotLocation
metadata:
  name: default
  namespace: velero
spec:
  provider: openebs.io/zfspv-blockstore
  config:
    bucket: velero
    prefix: zfs
    backup: incremental
    namespace: openebs
    provider: aws
    region: minio
    s3ForcePathStyle: "true"
    s3Url: http://minio.velero.svc:9000
```

4. Create backup

velero backup create my-backup --snapshot-volumes --include-namespaces=velero-ns --volume-snapshot-locations=aws-cloud-default --storage-location=default

5. Create Schedule

velero create schedule newschedule  --schedule="*/1 * * * *" --snapshot-volumes --include-namespaces=velero-ns --volume-snapshot-locations=aws-local-default --storage-location=default

6. Restore from backup

velero restore create --from-backup my-backup --restore-volumes=true --namespace-mappings velero-ns:ns1



Signed-off-by: Pawan <pawan@mayadata.io>
2020-09-08 13:44:39 +05:30
Pawan
39d2ee2859 fix(zfspv): fixing mounting issue with xfs
We changed the ubuntu docker image to 20.04 in https://github.com/openebs/zfs-localpv/pull/170,
which has issues with formatting the zvol as xfs file system. The filesystem
formatted with xfs is not able to mount with error : "missing codepage or helper program, or other error".

Reverting back to ubuntu 19.10 to fix this issue.

Signed-off-by: Pawan <pawan@mayadata.io>
2020-07-09 19:10:36 +05:30
Pawan
051f26fe16 feat(btrfs): adding support to have btrfs filesystem for ZFS-LocalPV
Now, applications can use the btrfs file system by mentioning "btrfs"
as fstype in the storageclass :-

apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
  name: openebs-zfspv
parameters:
  fstype: "btrfs"
  poolname: "zfspv-pool"
provisioner: zfs.csi.openebs.io

Signed-off-by: Pawan <pawan@mayadata.io>
2020-07-02 00:40:59 +05:30
vaniisgh
54f2b0b9fd
chore(doc): update docs for GO module support (#160)
Signed-off-by: vaniisgh <vanisingh@live.co.uk>>
2020-06-26 17:11:31 +05:30
prateekpandey14
fa76b346a0 feat(modules): migrate to go modules and bump go version 1.14.4
- migrate to go module
- bump go version 1.14.4

Signed-off-by: prateekpandey14 <prateek.pandey@mayadata.io>
2020-06-09 22:27:01 +05:30
Pawan
e558bb52cb feat(centos): adding operator yaml for centos7 and centos8
Signed-off-by: Pawan <pawan@mayadata.io>
2020-06-08 10:35:13 +05:30
Pawan
472fd603ac feat(beta): adding v1 CRD for ZFS-LocalPV
Moving the CRDs to stable v1 version.

Signed-off-by: Pawan <pawan@mayadata.io>
2020-06-04 16:02:32 +05:30
Pawan
4a92213505 fix(version): use the travis tag for the version
if there are no changes then `git describe --tags `git rev-list --tags --max-count=1`
may return older tag as there will be two tags referring to the same commit.

Using travis tag here to clearly differentiate the versions.

Signed-off-by: Pawan <pawan@mayadata.io>
2020-05-14 17:56:54 +05:30
Pawan
654f363b5d refact(build):trim leading v from image tag
Signed-off-by: Pawan <pawan@mayadata.io>
2020-05-07 22:06:24 +05:30
Pawan
a8a490e9cb refact(build): make the docker images configurable
and Also trim leading v from image tag.

Signed-off-by: Pawan <pawan@mayadata.io>
2020-05-07 19:18:48 +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
Prateek Pandey
6033789c17
feat(crd-gen): automate the CRDs generation with validations for APIs (#75)
- To generate the CRD spec `make manifest` generate then under
  deploy/yamls directory
- added a update-crd script to automate the steps to generate
  CRDs and its validation of each types

Signed-off-by: prateekpandey14 <prateek.pandey@mayadata.io>
2020-04-01 17:54:20 +05:30
Steve Fan
3e874ffad7
Upgrade the base ubuntu package (#68)
Addresses GLIBC incompatability
Probably fixes #67

Signed-off-by: Steve Fan <29133953+stevefan1999-personal@users.noreply.github.com>
2020-03-30 17:52:18 +05:30
Pawan
1c9ee3102a feat(version): Makefile and version enhancement
Make to run go test for executing  unit test cases.

Removed version file, now if travis tag is set,
the VERSION will be set to that tag. And if travis
tag is not set, the driver version will be set to

 <branch-name>:<short commit hash>:<build date>

Signed-off-by: Pawan <pawan@mayadata.io>
2020-03-16 20:31:43 +05:30
Pawan
d608dbacd8 feat(analytics): adding google analytics for ZFSPV
Whenever a volume is provisioned and de-provisioned we will send a google event with mainly following details :
1.    pvName (will shown as app title in google analytics)
2.    size of the volume
3.    event type : volume-provision, volume-deprovision
4.    storage type zfs-localpv
5.    replicacount as 1
6.    ClientId as default namespace uuid

Apart from this, we send the event once in 24 hr, which will have some info like number of nodes, node type, kubernetes version etc.

This metric is cotrolled by OPENEBS_IO_ENABLE_ANALYTICS env. We can set it to false if we don't want to send the metrics.

Signed-off-by: Pawan <pawan@mayadata.io>
2020-03-02 23:00:22 +05:30
Pawan
1ce53690f8 test(zfspv): making test cases to run on forked repo
Signed-off-by: Pawan <pawan@mayadata.io>
2019-12-06 09:47:11 +05:30
Pawan
57b3acf079 feat(ZFSPV): adding xfs filesystem support for zfs-localpv
Signed-off-by: Pawan <pawan@mayadata.io>
2019-11-06 22:02:51 +05:30
Pawan
b33542eee2 bug(zfspv): not able to deploy on rancher with ZFS 0.8.
The ZFS 0.8 has dependency on libcrypto.so.1.1 which in turn
requires GLIBC_2.25 supported by the system. Changed the docker
image to 18:04 as 16:04 has glibc version 2.23.

Also updated the README with the supported system details.

Signed-off-by: Pawan <pawan@mayadata.io>
2019-09-19 21:26:26 +05:30
Pawan
9f5cf445df feat(zfs-localpv): initial commit
provisioning and deprovisioning of
the volumes on the node where zfs pool
has already been setup. Pool name and the volume
parameters has to be given in storage class
which will be used to provision the volume.

Signed-off-by: Pawan <pawan@mayadata.io>
2019-09-18 08:44:08 +05:30