Skip to content

Job backup strategy: make batch/v1.Job backoffLimit configurable #2742

Open

Description

Summary

The generic Job backup strategy (strategy.backups.cozystack.io/Job) renders the rendered batch/v1.Job with a hard-coded backoffLimit: 2 in buildJobStrategyBatchJob (internal/backupcontroller/jobstrategy_controller.go). Operators have no way to override it.

Why it matters

The Job strategy is the app-agnostic driver intended to wrap arbitrary backup tools. A fixed retry count is a poor fit across tools:

  • An S3-heavy dump (e.g. clickhouse-backup) may want 0 retries — each retry re-uploads and is expensive.
  • A sidecar-style tool may want more retries to ride out transient infrastructure errors.

The value of 2 was inherited from the Altinity driver, which can hard-code it because it wraps a single known tool. The Job driver cannot make that assumption.

Options

  1. Preferred: expose backoffLimit as an optional field on JobSpec (api/backups/strategy/v1alpha1/job_types.go), defaulting to the current value of 2 when unset, and thread it into buildJobStrategyBatchJob. Requires a CRD regeneration.
  2. Minimum: document in the JobSpec.Template CRD description that the rendered Job is fixed at backoffLimit=2 and cannot be overridden, so operators know to keep their backup image idempotent.

Context

Raised in review of #1721 (initial Job strategy implementation). That PR ships with the value fixed at 2; this issue tracks making it configurable.

Activity

  1. added
    kind/featureCategorizes issue or PR as related to a new feature
    area/storageIssues or PRs related to storage (linstor, seaweedfs, bucket, velero, harbor)
    on Jun 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/storageIssues or PRs related to storage (linstor, seaweedfs, bucket, velero, harbor)kind/featureCategorizes issue or PR as related to a new featurepriority/backlogGeneral backlog priority. Lower than priority/important-longtermtriage/acceptedIndicates an issue is ready to be actively worked on

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions