diff --git a/velero/daily-backup.yaml b/velero/daily-backup.yaml index ea64d9e..f719b5c 100644 --- a/velero/daily-backup.yaml +++ b/velero/daily-backup.yaml @@ -10,4 +10,7 @@ spec: ttl: 720h # 30 days ONLY h, d/w for day and week do not work! defaultVolumesToFsBackup: true snapshotVolumes: true - snapshotMoveData: true \ No newline at end of file + snapshotMoveData: true + resourcePolicy: + kind: configmap + name: skip-emptydir-policy diff --git a/velero/skip-emptydir-policy.yaml b/velero/skip-emptydir-policy.yaml new file mode 100644 index 0000000..74b094b --- /dev/null +++ b/velero/skip-emptydir-policy.yaml @@ -0,0 +1,16 @@ +# Volume policy for the backup schedules. emptyDir volumes hold nothing +# worth keeping, and backing them up fails when the pod is gone before its +# volume is read, as happens with Velero's own repository maintenance jobs. +apiVersion: v1 +kind: ConfigMap +metadata: + name: skip-emptydir-policy +data: + policy.yaml: | + version: v1 + volumePolicies: + - conditions: + volumeTypes: + - emptyDir + action: + type: skip diff --git a/velero/weekly-backup.yaml b/velero/weekly-backup.yaml index 3eea6ee..3aa4751 100644 --- a/velero/weekly-backup.yaml +++ b/velero/weekly-backup.yaml @@ -10,4 +10,7 @@ spec: ttl: 2160h # 90 days defaultVolumesToFsBackup: true snapshotVolumes: true - snapshotMoveData: true \ No newline at end of file + snapshotMoveData: true + resourcePolicy: + kind: configmap + name: skip-emptydir-policy