From dc84ef6b0b39d911d2c5d409c24f3fca32a44bcd Mon Sep 17 00:00:00 2001 From: Michael Thomson Date: Wed, 25 Sep 2024 15:18:18 -0400 Subject: [PATCH] velero resource policy Signed-off-by: Michael Thomson --- velero/helmrelease-velero.yaml | 14 +++----------- velero/resource-policies-configmap.yaml | 20 ++++++++++++++++++++ 2 files changed, 23 insertions(+), 11 deletions(-) create mode 100644 velero/resource-policies-configmap.yaml diff --git a/velero/helmrelease-velero.yaml b/velero/helmrelease-velero.yaml index a520ae5..90700aa 100644 --- a/velero/helmrelease-velero.yaml +++ b/velero/helmrelease-velero.yaml @@ -25,28 +25,18 @@ spec: name: plugins configuration: backupStorageLocation: - # name is the name of the backup storage location where backups should be stored. If a name is not provided, - # a backup storage location will be created with the name "default". Optional. - name: backblaze default: true - # provider is the name for the backup storage location provider. provider: aws - # bucket is the name of the bucket to store backups in. Required. bucket: mthomson-cluster-backup credential: - # name of the secret used by this backupStorageLocation. name: velero-secret - # name of key that contains the secret data to be used. key: cloud - # Additional provider-specific configuration. See link above - # for details of required/optional fields for your provider. config: region: us-west-004 s3Url: "https://s3.us-west-004.backblazeb2.com" volumeSnapshotLocation: - # name is the name of the volume snapshot location where snapshots are being taken. Required. - name: longhorn - # provider is the name for the volume snapshot provider. provider: csi defaultVolumeSnapshotLocations: csi:longhorn features: EnableCSI @@ -58,4 +48,6 @@ spec: template: ttl: "240h" storageLocation: backblaze # use the same name you defined above in backupStorageLocation - + resourcePolicy: + kind: configmap + name: resource-policies-configmap diff --git a/velero/resource-policies-configmap.yaml b/velero/resource-policies-configmap.yaml new file mode 100644 index 0000000..78497b9 --- /dev/null +++ b/velero/resource-policies-configmap.yaml @@ -0,0 +1,20 @@ +apiVersion: v1 +data: + resource-policies-configmap.yaml: | + version: v1 + volumePolicies: + - conditions: + storageClass: + - nfs-client + action: + type: skip + - conditions: + storageClass: + - longhorn + action: + type: snapshot +kind: ConfigMap +metadata: + creationTimestamp: null + name: resource-policies-configmap + namespace: velero