diff --git a/deploy/helm/charts/charts/crds/templates/zfsrestore.yaml b/deploy/helm/charts/charts/crds/templates/zfsrestore.yaml index b504b52dd..2ecc6830c 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 fd9f7e5d1..8c0b11928 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 2836fb573..41efc8a2b 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/helm/charts/templates/zfs-controller.yaml b/deploy/helm/charts/templates/zfs-controller.yaml index b4482edac..f9927963b 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: diff --git a/deploy/helm/charts/templates/zfs-node.yaml b/deploy/helm/charts/templates/zfs-node.yaml index 9755d7adb..b03c0ffa9 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: diff --git a/deploy/yamls/zfsrestore-crd.yaml b/deploy/yamls/zfsrestore-crd.yaml index 70abb9f49..6066434cf 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 5ef63060f..63dbab107 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 34e5383fc..9991b0786 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 ccd4e4e20..a73b252ee 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/docs/backup-restore.md b/docs/backup-restore.md index e5a5d0ace..c19f88de6 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 ``` diff --git a/pkg/apis/openebs.io/zfs/v1/zfsvolume.go b/pkg/apis/openebs.io/zfs/v1/zfsvolume.go index cb529a0a0..3bd900846 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/pkg/zfs/zfs_util.go b/pkg/zfs/zfs_util.go index 77f59dd3c..f0ed321f0 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 diff --git a/tests/utils.go b/tests/utils.go index 659e72b46..696c8d2fb 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", + }, } }