velero: v1.14.0 Scheduled backup fails if namespace doesn't exist

What steps did you take and what happened: Create a schedule and include a non-existing namespace:

apiVersion: velero.io/v1
kind: Schedule
metadata:
  name: daily-application-backup
  namespace: velero
  annotations:
  labels:
    app.kubernetes.io/name: velero
    app.kubernetes.io/instance: velero
spec:
  useOwnerReferencesInBackup: false
  schedule: "0 0 * * *"
  template:
    csiSnapshotTimeout: 14400s
    hooks: {}
    includeClusterResources: false
    includedNamespaces:
    - my-namespace
    - a-non-existing-namespace
    itemOperationTimeout: 0s
    metadata: {}
    ttl: 720h

What did you expect to happen:

Velero before v1.14.0 executed the backup without complaint. Velero v1.14.0 stops the scheduled backup instantly and sets the status FailedValidation instead of executing the backup and e.g. setting the PartiallyFailed status. This new behavior is dangerous (or even critical?) as scheduled backups become fragile and stop working as soon as a defined namespace doesn’t exist anymore.

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 18 (4 by maintainers)

Most upvoted comments

@phoenix-bjoern Ah, I see. Sorry for the misunderstood.

@kaovilai @sseago My understanding is the agreement is we should mark the Backup with a non-existing namespace name in the namespace filters as PartiallyFailed instead of FailedValidation.

If that’s correct, I will create a PR to fix it.

OK. I will create a cherry-pick PR to the release-1.14

@blackpiglet I think we’re all in agreement now. Go ahead and create the PR.

@blackpiglet CORRECT! Looking forward to your PR and happy to test it ❤️