Skip to content

Commit

Permalink
Back compat for schedules.
Browse files Browse the repository at this point in the history
A touch less graceful than I'd like but it does work.

Signed-off-by: W. Kavanaugh Latiolais <[email protected]>
  • Loading branch information
kav committed Oct 24, 2020
1 parent 4d2343d commit ff84aa9
Show file tree
Hide file tree
Showing 7 changed files with 57 additions and 3 deletions.
7 changes: 7 additions & 0 deletions charts/velero/ci/test-values-back-compat.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,13 @@ serviceAccount:
server:
name: velero

schedules:
mybackup:
schedule: "0 0 * * *"
template:
ttl: "240h"
includedNamespaces:
- foo
# Whether or not to clean up CustomResourceDefintions when deleting a release.
# Cleaning up CRDs will delete the BackupStorageLocation and VolumeSnapshotLocation instances, which would have to be reconfigured.
# Backup data in object storage will _not_ be deleted, however Backup instances in the Kubernetes API will.
Expand Down
7 changes: 7 additions & 0 deletions charts/velero/ci/test-values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,13 @@ serviceAccount:
server:
name: velero

schedules:
- name: mybackup
schedule: "0 0 * * *"
template:
ttl: "240h"
includedNamespaces:
- foo
# Whether or not to clean up CustomResourceDefintions when deleting a release.
# Cleaning up CRDs will delete the BackupStorageLocation and VolumeSnapshotLocation instances, which would have to be reconfigured.
# Backup data in object storage will _not_ be deleted, however Backup instances in the Kubernetes API will.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -164,3 +164,22 @@ manifest should match snapshot:
bucket: velero
region: us-west-1
provider: aws
5: |
apiVersion: velero.io/v1
kind: Schedule
metadata:
annotations:
helm.sh/hook: post-install,post-upgrade
helm.sh/hook-delete-policy: before-hook-creation
labels:
app.kubernetes.io/instance: RELEASE-NAME
app.kubernetes.io/managed-by: Tiller
app.kubernetes.io/name: velero
helm.sh/chart: velero-2.14.0
name: RELEASE-NAME-velero-mybackup
spec:
schedule: 0 0 * * *
template:
includedNamespaces:
- foo
ttl: 240h
19 changes: 19 additions & 0 deletions charts/velero/tests/__snapshot__/snapshot__test.yaml.snap
Original file line number Diff line number Diff line change
Expand Up @@ -164,3 +164,22 @@ manifest should match snapshot:
bucket: velero
region: us-west-1
provider: aws
5: |
apiVersion: velero.io/v1
kind: Schedule
metadata:
annotations:
helm.sh/hook: post-install,post-upgrade
helm.sh/hook-delete-policy: before-hook-creation
labels:
app.kubernetes.io/instance: RELEASE-NAME
app.kubernetes.io/managed-by: Tiller
app.kubernetes.io/name: velero
helm.sh/chart: velero-2.14.0
name: RELEASE-NAME-velero-mybackup
spec:
schedule: 0 0 * * *
template:
includedNamespaces:
- foo
ttl: 240h
1 change: 1 addition & 0 deletions charts/velero/tests/back-compat-snapshot_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ templates:
- backupstoragelocation.yaml
- restic-daemonset.yaml
- volumesnapshotlocation.yaml
- schedule.yaml
tests:
- it: manifest should match snapshot
values:
Expand Down
1 change: 1 addition & 0 deletions charts/velero/tests/snapshot__test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ templates:
- backupstoragelocation.yaml
- restic-daemonset.yaml
- volumesnapshotlocation.yaml
- schedule.yaml
tests:
- it: manifest should match snapshot
values:
Expand Down
6 changes: 3 additions & 3 deletions charts/velero/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -262,13 +262,13 @@ restic:
# Backup schedules to create.
# Eg:
# schedules:
# name: mybackup
# - name: mybackup
# schedule: "0 0 * * *"
# template:
# ttl: "240h"
# includedNamespaces:
# - foo
schedules: []
# schedules: []

scheduleLabels: {}

Expand All @@ -287,7 +287,7 @@ configMaps: {}
## End of additional Velero resource settings.
##

# Depricated configuration key
# Depricated
configuration:
backupStorageLocation: {}
volumeSnapshotLocation: {}

0 comments on commit ff84aa9

Please sign in to comment.