Skip to content

Commit

Permalink
Merge branch 'openebs:develop' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
chris199512 authored Oct 21, 2024
2 parents 6cde8a5 + d23f638 commit c626641
Show file tree
Hide file tree
Showing 11 changed files with 22 additions and 16 deletions.
2 changes: 1 addition & 1 deletion deploy/helm/charts/charts/crds/templates/zfsrestore.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion deploy/helm/charts/charts/crds/templates/zfssnapshot.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion deploy/helm/charts/charts/crds/templates/zfsvolume.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion deploy/yamls/zfsrestore-crd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion deploy/yamls/zfssnapshot-crd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion deploy/yamls/zfsvolume-crd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions deploy/zfs-operator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
8 changes: 3 additions & 5 deletions docs/backup-restore.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 <bucket_name> --secret-file <./aws-iam-creds> --plugins velero/velero-plugin-for-aws:v1.0.0-beta.1 --backup-location-config region=<bucket_region>,s3ForcePathStyle="true" --use-volume-snapshots=true --use-node-agent --uploader-type restic
velero install --provider aws --bucket <bucket_name> --secret-file <./aws-iam-creds> --plugins velero/velero-plugin-for-aws:v1.10.1 --backup-location-config region=<bucket_region>,s3ForcePathStyle="true" --use-volume-snapshots=true --use-node-agent
```

We have to install the velero 1.5 or later version for LocalPV-ZFS.
Expand All @@ -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
```

Expand Down
2 changes: 1 addition & 1 deletion pkg/apis/openebs.io/zfs/v1/zfsvolume.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
4 changes: 4 additions & 0 deletions pkg/zfs/zfs_util.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 5 additions & 1 deletion tests/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -639,7 +639,7 @@ func getStoragClassParams() []map[string]string {
},
{
"fstype": "zfs",
"compression": "zstd-6",
"compression": "zstd-fast",
"dedup": "on",
"thinprovision": "yes",
},
Expand Down Expand Up @@ -677,5 +677,9 @@ func getStoragClassParams() []map[string]string {
"compression": "zstd-6",
"dedup": "on",
},
{
"fstype": "xfs",
"compression": "zstd-fast",
},
}
}

0 comments on commit c626641

Please sign in to comment.