Skip to content

Commit

Permalink
Add backup retention
Browse files Browse the repository at this point in the history
- retention_days parameter is optional, it doesn't apply to incremental backups for example.
- The order we write the entries in the backup items list is preserved, so backups that take less time can be executed first.
  • Loading branch information
afausti committed Jan 6, 2025
1 parent 9d2c55d commit 8e4be89
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 7 deletions.
2 changes: 1 addition & 1 deletion applications/sasquatch/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ Rubin Observatory's telemetry service
| app-metrics.resources | object | See `values.yaml` | Kubernetes resources requests and limits |
| app-metrics.tolerations | list | `[]` | Tolerations for pod assignment |
| backup.affinity | object | `{}` | Affinity rules for the backups deployment pod |
| backup.backupItems | list | `[{"enabled":false,"name":"influxdb-enterprise"},{"enabled":false,"name":"chronograf"},{"enabled":false,"name":"kapacitor"}]` | List of items to backup, must match the names in the sasquatch backup script |
| backup.backupItems | list | `[{"enabled":false,"name":"chronograf","retention_days":7},{"enabled":false,"name":"kapacitor","retention_days":7},{"enabled":false,"name":"influxdb-enterprise-incremental"}]` | List of items to backup, must match the names in the sasquatch backup script |
| backup.image.pullPolicy | string | `"IfNotPresent"` | Pull policy for the backups image |
| backup.image.repository | string | `"ghcr.io/lsst-sqre/sasquatch"` | Image to use in the backups deployment |
| backup.image.tag | string | The appVersion of the chart | Tag of image to use |
Expand Down
2 changes: 1 addition & 1 deletion applications/sasquatch/charts/backup/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Backup Sasquatch data
| Key | Type | Default | Description |
|-----|------|---------|-------------|
| affinity | object | `{}` | Affinity rules for the backups deployment pod |
| backupItems | list | `[{"enabled":false,"name":"influxdb-enterprise"},{"enabled":false,"name":"chronograf"},{"enabled":false,"name":"kapacitor"}]` | List of items to backup, must match the names in the sasquatch backup script |
| backupItems | list | `[{"enabled":false,"name":"chronograf","retention_days":7},{"enabled":false,"name":"kapacitor","retention_days":7},{"enabled":false,"name":"influxdb-enterprise-incremental"}]` | List of items to backup, must match the names in the sasquatch backup script |
| image.pullPolicy | string | `"IfNotPresent"` | Pull policy for the backups image |
| image.repository | string | `"ghcr.io/lsst-sqre/sasquatch"` | Image to use in the backups deployment |
| image.tag | string | The appVersion of the chart | Tag of image to use |
Expand Down
6 changes: 4 additions & 2 deletions applications/sasquatch/charts/backup/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,14 @@ persistence:

# -- List of items to backup, must match the names in the sasquatch backup script
backupItems:
- name: "influxdb-enterprise"
enabled: false
- name: "chronograf"
enabled: false
retention_days: 7
- name: "kapacitor"
enabled: false
retention_days: 7
- name: "influxdb-enterprise-incremental"
enabled: false

# -- Affinity rules for the backups deployment pod
affinity: {}
Expand Down
6 changes: 4 additions & 2 deletions applications/sasquatch/values-idfdev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -170,9 +170,11 @@ backup:
size: 500Gi
storageClass: standard
backupItems:
- name: "influxdb-enterprise"
enabled: true
- name: "chronograf"
enabled: true
retention_days: 3
- name: "kapacitor"
enabled: true
retention_days: 3
- name: "influxdb-enterprise-incremental"
enabled: true
2 changes: 1 addition & 1 deletion applications/sasquatch/values-usdfprod.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -372,5 +372,5 @@ backup:
size: 100Ti
storageClass: wekafs--sdf-k8s01
backupItems:
- name: influxdb-enterprise
- name: influxdb-enterprise-incremental
enabled: true

0 comments on commit 8e4be89

Please sign in to comment.