Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(deploy): indent for imagePullSecrets #596

Merged
merged 5 commits into from
Nov 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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/helm/charts/templates/zfs-controller.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion deploy/helm/charts/templates/zfs-node.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
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",
},
}
}
Loading