velero resource policy

Signed-off-by: Michael Thomson <michael@michaelthomson.dev>
This commit is contained in:
2024-09-25 15:18:18 -04:00
parent 2d7423ae87
commit dc84ef6b0b
2 changed files with 23 additions and 11 deletions

View File

@@ -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

View File

@@ -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