Skip to content

Commit

Permalink
chore: simplify the regex
Browse files Browse the repository at this point in the history
Signed-off-by: Abhinandan Purkait <[email protected]>
  • Loading branch information
Abhinandan-Purkait committed Oct 16, 2024
1 parent c9a0113 commit 12145af
Show file tree
Hide file tree
Showing 8 changed files with 10 additions and 10 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-fast|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-fast|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-fast|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-fast|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-fast|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-fast|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-fast|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-fast|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-fast|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 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-fast|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

0 comments on commit 12145af

Please sign in to comment.