Skip to content
This repository has been archived by the owner on Jun 29, 2022. It is now read-only.

Commit

Permalink
velero: add new field to restic plugin
Browse files Browse the repository at this point in the history
This commit adds a new field `default_volumes_to_restic` that was
introduced in Velero v1.5.2.

If enabled the user will not have to manually add annotations to the pod
when taking backups.

Signed-off-by: Imran Pochi <imran@kinvolk.io>
  • Loading branch information
ipochi committed Oct 28, 2020
1 parent 03d8d2e commit 1e9c9bc
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
3 changes: 3 additions & 0 deletions docs/configuration-reference/components/velero.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,8 @@ component "velero" {
# restic {
# credentials = file("cloud-credentials-file")
#
# default_volumes_to_restic = true
#
# backup_storage_location {
# provider = "aws"
# bucket = "my-bucket"
Expand Down Expand Up @@ -145,6 +147,7 @@ Table of all the arguments accepted by the component.
| `openebs.volume_snapshot_location.s3_url` | S3 API URL. | - | string | false |
| `restic` | Configure Restic provider for Velero. | - | object | false |
| `restic.credentials` | Content of cloud provider credentials. | - | string | true |
| `restic.default_volumes_to_restic` | Backup all pod volumes without having to apply annotation on the pod when using restic. | false | bool | false |
| `restic.backup_storage_location.provider` | Cloud provider name for storing backups. | - | string | false |
| `restic.backup_storage_location.bucket` | Cloud storage bucket name for storing backups. | - | string | true |
| `restic.backup_storage_location.name` | Name for backup location object on the cluster. | - | string | false |
Expand Down
5 changes: 3 additions & 2 deletions pkg/components/velero/restic/restic.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,9 @@ const indentation = 6

// Configuration contains Restic specific parameters.
type Configuration struct {
Credentials string `hcl:"credentials"`
BackupStorageLocation *BackupStorageLocation `hcl:"backup_storage_location,block"`
Credentials string `hcl:"credentials"`
DefaultVolumesToRestic bool `hcl:"default_volumes_to_restic"`
BackupStorageLocation *BackupStorageLocation `hcl:"backup_storage_location,block"`
}

// BackupStorageLocation configures the backup storage location.
Expand Down
1 change: 1 addition & 0 deletions pkg/components/velero/restic/template.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ configuration:
bucket: {{ .Configuration.BackupStorageLocation.Bucket }}
config:
region: {{ .Configuration.BackupStorageLocation.Region }}
defaultVolumesToRestic: {{ .Configuration.DefaultVolumesToRestic }}
deployRestic: true
snapshotsEnabled: false
restic:
Expand Down

0 comments on commit 1e9c9bc

Please sign in to comment.