Skip to content

Commit

Permalink
Merge pull request #140 from projectsyn/skip-without-annotation
Browse files Browse the repository at this point in the history
Add option to skip backups for PVCs that aren't explicitly annotated
  • Loading branch information
haasad authored Jun 26, 2024
2 parents b4e625a + a839126 commit 4de306d
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 0 deletions.
3 changes: 3 additions & 0 deletions class/defaults.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,8 @@ parameters:
value: '${backup_k8up:global_backup_config:restore_bucket}'
- name: BACKUP_GLOBALRESTORES3ENDPOINT
value: '${backup_k8up:global_backup_config:restore_s3endpoint}'
- name: BACKUP_SKIP_WITHOUT_ANNOTATION
value: '${backup_k8up:global_backup_config:skip_without_annotation}'

global_backup_config:
enabled: true
Expand All @@ -107,6 +109,7 @@ parameters:
failed_jobs_history_limit: null
stats_url: null
s3_endpoint: null
skip_without_annotation: false
backofflimit: '2'
annotation: k8up.io/backup
backupcommandannotation: k8up.io/backupcommand
Expand Down
8 changes: 8 additions & 0 deletions docs/modules/ROOT/pages/references/parameters.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,14 @@ If neither `global_backup_config.keepjobs` nor this parameter are set, the https
type:: string
default:: `null`

== `global_backup_config.skip_without_annotation`

[horizontal]
type:: bool
default:: `false`

Skips backups for all PVCs that aren't explicitly annotated with `k8up.io/backup`.

== `global_backup_config.s3_endpoint`

[horizontal]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ spec:
value: k8up.io/backupcommand
- name: BACKUP_BACKOFFLIMIT
value: '2'
- name: BACKUP_SKIP_WITHOUT_ANNOTATION
value: false
image: ghcr.io/k8up-io/k8up:v2.10.0
imagePullPolicy: IfNotPresent
livenessProbe:
Expand Down

0 comments on commit 4de306d

Please sign in to comment.