Skip to content

successfulJobsHistoryLimit Applies Namespace-Wide Instead of Per Schedule #1053

@FieldofClay

Description

@FieldofClay

Description

It appears that successfulJobsHistoryLimit is applied across all Schedules within the same namespace, rather than being scoped to the Backups created by each individual Schedule.

Additional Context

  • When creating two Schedules in separate namespaces, the expected behavior occurs (each Schedule retains its own backups properly).
  • failedJobsHistoryLimit may also be affected by this issue.

Logs

Expected Behavior

Each Schedule should retain up to successfulJobsHistoryLimit backups independently, meaning we should see four backups in total (two per Schedule) from the steps listed below.

Steps To Reproduce

  1. Create two backup Schedules within the same namespace, each selecting different pods using label selectors.
  2. Set successfulJobsHistoryLimit to 2 for both Schedules.
  3. Only the two most recent backups are retained across both Schedules, rather than retaining two per Schedule (for a total of four).

Version of K8up

v2.12.0

Version of Kubernetes

v1.31

Distribution of Kubernetes

k3s

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions