From c81112c747acee560e903c8433e1729456282970 Mon Sep 17 00:00:00 2001 From: chris199512 <84684730+chris199512@users.noreply.github.com> Date: Thu, 10 Oct 2024 16:29:16 +0200 Subject: [PATCH 1/5] fix indent Signed-off-by: chris199512 <84684730+chris199512@users.noreply.github.com> --- deploy/helm/charts/templates/zfs-controller.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deploy/helm/charts/templates/zfs-controller.yaml b/deploy/helm/charts/templates/zfs-controller.yaml index b4482eda..f9927963 100644 --- a/deploy/helm/charts/templates/zfs-controller.yaml +++ b/deploy/helm/charts/templates/zfs-controller.yaml @@ -146,7 +146,7 @@ spec: {{- end }} {{- if .Values.imagePullSecrets }} imagePullSecrets: -{{ toYaml .Values.imagePullSecrets | indent 2 }} +{{ toYaml .Values.imagePullSecrets | indent 8 }} {{- end }} {{- if .Values.zfsController.nodeSelector }} nodeSelector: From 47f0ec97a9ff120f40a27a6702d0ecee5e27aa23 Mon Sep 17 00:00:00 2001 From: chris199512 <84684730+chris199512@users.noreply.github.com> Date: Thu, 10 Oct 2024 16:29:45 +0200 Subject: [PATCH 2/5] fix indent Signed-off-by: chris199512 <84684730+chris199512@users.noreply.github.com> --- deploy/helm/charts/templates/zfs-node.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deploy/helm/charts/templates/zfs-node.yaml b/deploy/helm/charts/templates/zfs-node.yaml index 9755d7ad..b03c0ffa 100644 --- a/deploy/helm/charts/templates/zfs-node.yaml +++ b/deploy/helm/charts/templates/zfs-node.yaml @@ -148,7 +148,7 @@ spec: {{- end }} {{- if .Values.imagePullSecrets }} imagePullSecrets: -{{ toYaml .Values.imagePullSecrets | indent 2 }} +{{ toYaml .Values.imagePullSecrets | indent 8 }} {{- end }} {{- if .Values.zfsNode.nodeSelector }} nodeSelector: From 41b1594b3a00df69da4e5eca4da6a989a2c743a1 Mon Sep 17 00:00:00 2001 From: Abhinandan Purkait Date: Wed, 16 Oct 2024 15:48:08 +0530 Subject: [PATCH 3/5] feat(compression): allow zstd-fast algorithm (#597) * feat(compression): allow zstd-fast algorithm Signed-off-by: Abhinandan Purkait * test: add new entry for zstd-fast compression Signed-off-by: Abhinandan Purkait * chore: simplify the regex Signed-off-by: Abhinandan Purkait --------- Signed-off-by: Abhinandan Purkait Signed-off-by: chris199512 <84684730+chris199512@users.noreply.github.com> --- deploy/helm/charts/charts/crds/templates/zfsrestore.yaml | 2 +- deploy/helm/charts/charts/crds/templates/zfssnapshot.yaml | 2 +- deploy/helm/charts/charts/crds/templates/zfsvolume.yaml | 2 +- deploy/yamls/zfsrestore-crd.yaml | 2 +- deploy/yamls/zfssnapshot-crd.yaml | 2 +- deploy/yamls/zfsvolume-crd.yaml | 2 +- deploy/zfs-operator.yaml | 6 +++--- pkg/apis/openebs.io/zfs/v1/zfsvolume.go | 2 +- tests/utils.go | 6 +++++- 9 files changed, 15 insertions(+), 11 deletions(-) diff --git a/deploy/helm/charts/charts/crds/templates/zfsrestore.yaml b/deploy/helm/charts/charts/crds/templates/zfsrestore.yaml index b504b52d..2ecc6830 100644 --- a/deploy/helm/charts/charts/crds/templates/zfsrestore.yaml +++ b/deploy/helm/charts/charts/crds/templates/zfsrestore.yaml @@ -91,7 +91,7 @@ spec: 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|zstd|zstd-[1-9]|zstd-1[0-9]|gzip|gzip-[1-9]|zle|lz4)$ + pattern: ^(on|off|lzjb|zstd(?:-fast|-[1-9]|-1[0-9])?|gzip(?:-[1-9])?|zle|lz4)$ type: string dedup: description: 'Deduplication is the process for removing redundant diff --git a/deploy/helm/charts/charts/crds/templates/zfssnapshot.yaml b/deploy/helm/charts/charts/crds/templates/zfssnapshot.yaml index fd9f7e5d..8c0b1192 100644 --- a/deploy/helm/charts/charts/crds/templates/zfssnapshot.yaml +++ b/deploy/helm/charts/charts/crds/templates/zfssnapshot.yaml @@ -60,7 +60,7 @@ spec: 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|zstd|zstd-[1-9]|zstd-1[0-9]|gzip|gzip-[1-9]|zle|lz4)$ + pattern: ^(on|off|lzjb|zstd(?:-fast|-[1-9]|-1[0-9])?|gzip(?:-[1-9])?|zle|lz4)$ type: string dedup: description: 'Deduplication is the process for removing redundant diff --git a/deploy/helm/charts/charts/crds/templates/zfsvolume.yaml b/deploy/helm/charts/charts/crds/templates/zfsvolume.yaml index 2836fb57..41efc8a2 100644 --- a/deploy/helm/charts/charts/crds/templates/zfsvolume.yaml +++ b/deploy/helm/charts/charts/crds/templates/zfsvolume.yaml @@ -86,7 +86,7 @@ spec: 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|zstd|zstd-[1-9]|zstd-1[0-9]|gzip|gzip-[1-9]|zle|lz4)$ + pattern: ^(on|off|lzjb|zstd(?:-fast|-[1-9]|-1[0-9])?|gzip(?:-[1-9])?|zle|lz4)$ type: string dedup: description: 'Deduplication is the process for removing redundant diff --git a/deploy/yamls/zfsrestore-crd.yaml b/deploy/yamls/zfsrestore-crd.yaml index 70abb9f4..6066434c 100644 --- a/deploy/yamls/zfsrestore-crd.yaml +++ b/deploy/yamls/zfsrestore-crd.yaml @@ -89,7 +89,7 @@ spec: 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|zstd|zstd-[1-9]|zstd-1[0-9]|gzip|gzip-[1-9]|zle|lz4)$ + pattern: ^(on|off|lzjb|zstd(?:-fast|-[1-9]|-1[0-9])?|gzip(?:-[1-9])?|zle|lz4)$ type: string dedup: description: 'Deduplication is the process for removing redundant diff --git a/deploy/yamls/zfssnapshot-crd.yaml b/deploy/yamls/zfssnapshot-crd.yaml index 5ef63060..63dbab10 100644 --- a/deploy/yamls/zfssnapshot-crd.yaml +++ b/deploy/yamls/zfssnapshot-crd.yaml @@ -58,7 +58,7 @@ spec: 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|zstd|zstd-[1-9]|zstd-1[0-9]|gzip|gzip-[1-9]|zle|lz4)$ + pattern: ^(on|off|lzjb|zstd(?:-fast|-[1-9]|-1[0-9])?|gzip(?:-[1-9])?|zle|lz4)$ type: string dedup: description: 'Deduplication is the process for removing redundant diff --git a/deploy/yamls/zfsvolume-crd.yaml b/deploy/yamls/zfsvolume-crd.yaml index 34e5383f..9991b078 100644 --- a/deploy/yamls/zfsvolume-crd.yaml +++ b/deploy/yamls/zfsvolume-crd.yaml @@ -84,7 +84,7 @@ spec: 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|zstd|zstd-[1-9]|zstd-1[0-9]|gzip|gzip-[1-9]|zle|lz4)$ + pattern: ^(on|off|lzjb|zstd(?:-fast|-[1-9]|-1[0-9])?|gzip(?:-[1-9])?|zle|lz4)$ type: string dedup: description: 'Deduplication is the process for removing redundant diff --git a/deploy/zfs-operator.yaml b/deploy/zfs-operator.yaml index ccd4e4e2..a73b252e 100644 --- a/deploy/zfs-operator.yaml +++ b/deploy/zfs-operator.yaml @@ -1377,7 +1377,7 @@ spec: 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|zstd|zstd-[1-9]|zstd-1[0-9]|gzip|gzip-[1-9]|zle|lz4)$ + pattern: ^(on|off|lzjb|zstd(?:-fast|-[1-9]|-1[0-9])?|gzip(?:-[1-9])?|zle|lz4)$ type: string dedup: description: 'Deduplication is the process for removing redundant @@ -1582,7 +1582,7 @@ spec: 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|zstd|zstd-[1-9]|zstd-1[0-9]|gzip|gzip-[1-9]|zle|lz4)$ + pattern: ^(on|off|lzjb|zstd(?:-fast|-[1-9]|-1[0-9])?|gzip(?:-[1-9])?|zle|lz4)$ type: string dedup: description: 'Deduplication is the process for removing redundant @@ -1989,7 +1989,7 @@ spec: 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|zstd|zstd-[1-9]|zstd-1[0-9]|gzip|gzip-[1-9]|zle|lz4)$ + pattern: ^(on|off|lzjb|zstd(?:-fast|-[1-9]|-1[0-9])?|gzip(?:-[1-9])?|zle|lz4)$ type: string dedup: description: 'Deduplication is the process for removing redundant diff --git a/pkg/apis/openebs.io/zfs/v1/zfsvolume.go b/pkg/apis/openebs.io/zfs/v1/zfsvolume.go index cb529a0a..3bd90084 100644 --- a/pkg/apis/openebs.io/zfs/v1/zfsvolume.go +++ b/pkg/apis/openebs.io/zfs/v1/zfsvolume.go @@ -106,7 +106,7 @@ type VolumeInfo struct { // the next day the compression was modified to "on", the data written prior to setting "on" will // not be compressed. // Default Value: off. - // +kubebuilder:validation:Pattern="^(on|off|lzjb|zstd|zstd-[1-9]|zstd-1[0-9]|gzip|gzip-[1-9]|zle|lz4)$" + // +kubebuilder:validation:Pattern="^(on|off|lzjb|zstd(?:-fast|-[1-9]|-1[0-9])?|gzip(?:-[1-9])?|zle|lz4)$" Compression string `json:"compression,omitempty"` // Deduplication is the process for removing redundant data at the block level, diff --git a/tests/utils.go b/tests/utils.go index 659e72b4..696c8d2f 100644 --- a/tests/utils.go +++ b/tests/utils.go @@ -639,7 +639,7 @@ func getStoragClassParams() []map[string]string { }, { "fstype": "zfs", - "compression": "zstd-6", + "compression": "zstd-fast", "dedup": "on", "thinprovision": "yes", }, @@ -677,5 +677,9 @@ func getStoragClassParams() []map[string]string { "compression": "zstd-6", "dedup": "on", }, + { + "fstype": "xfs", + "compression": "zstd-fast", + }, } } From 97ce1580c4e3c52d2f8fb5c70f264a40419653f6 Mon Sep 17 00:00:00 2001 From: Alexandre Buisine Date: Wed, 16 Oct 2024 12:57:54 +0200 Subject: [PATCH 4/5] fix(reservation): while expanding, with refquota setting (#595) Signed-off-by: Alexandre Buisine Signed-off-by: chris199512 <84684730+chris199512@users.noreply.github.com> --- pkg/zfs/zfs_util.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkg/zfs/zfs_util.go b/pkg/zfs/zfs_util.go index 77f59dd3..f0ed321f 100644 --- a/pkg/zfs/zfs_util.go +++ b/pkg/zfs/zfs_util.go @@ -297,6 +297,10 @@ func buildVolumeResizeArgs(vol *apis.ZFSVolume) []string { ZFSVolArg = append(ZFSVolArg, volsizeProperty) } + if vol.Spec.ThinProvision == "no" { + ZFSVolArg = append(ZFSVolArg, "-o", reservationProperty(vol.Spec.QuotaType, vol.Spec.Capacity)) + } + ZFSVolArg = append(ZFSVolArg, volume) return ZFSVolArg From 8c402d36b198a376c66a6ff7defc04619edb7c66 Mon Sep 17 00:00:00 2001 From: Rasmus Thomsen Date: Wed, 11 Sep 2024 14:51:55 +0200 Subject: [PATCH 5/5] docs(backup-restore): update kubectl output * Velero doesn't start the Restic Pods anymore. * Also update the AWS-Plugin. Signed-off-by: Rasmus Thomsen Signed-off-by: chris199512 <84684730+chris199512@users.noreply.github.com> --- docs/backup-restore.md | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/docs/backup-restore.md b/docs/backup-restore.md index e5a5d0ac..c19f88de 100644 --- a/docs/backup-restore.md +++ b/docs/backup-restore.md @@ -37,13 +37,13 @@ aws_secret_access_key = minio123 We can install Velero by using below command ``` -velero install --provider aws --bucket velero --secret-file /home/pawan/velero/credentials-minio --plugins velero/velero-plugin-for-aws:v1.0.0-beta.1 --backup-location-config region=minio,s3ForcePathStyle="true",s3Url=http://minio.velero.svc:9000 --use-volume-snapshots=true --use-node-agent --uploader-type restic +velero install --provider aws --bucket velero --secret-file /home/pawan/velero/credentials-minio --plugins velero/velero-plugin-for-aws:v1.10.1 --backup-location-config region=minio,s3ForcePathStyle="true",s3Url=http://minio.velero.svc:9000 --use-volume-snapshots=true --use-node-agent ``` If you would like to use cloud storage like AWS-S3 buckets for storing backups, you could use a command like the following: ``` -velero install --provider aws --bucket --secret-file <./aws-iam-creds> --plugins velero/velero-plugin-for-aws:v1.0.0-beta.1 --backup-location-config region=,s3ForcePathStyle="true" --use-volume-snapshots=true --use-node-agent --uploader-type restic +velero install --provider aws --bucket --secret-file <./aws-iam-creds> --plugins velero/velero-plugin-for-aws:v1.10.1 --backup-location-config region=,s3ForcePathStyle="true" --use-volume-snapshots=true --use-node-agent ``` We have to install the velero 1.5 or later version for LocalPV-ZFS. @@ -65,9 +65,7 @@ $ kubectl get po -n velero NAME READY STATUS RESTARTS AGE minio-d787f4bf7-xqmq5 1/1 Running 0 8s minio-setup-prln8 0/1 Completed 0 8s -restic-4kx8l 1/1 Running 0 69s -restic-g5zq9 1/1 Running 0 69s -restic-k7k4s 1/1 Running 0 69s +node-agent-lltf2 1/1 Running 0 69s velero-7d9c448bc5-j424s 1/1 Running 3 69s ```