Skip to content

Commit a557730

Browse files
authored
Merge pull request #33 from osodevops/fix/issue-30-orphaned-pods
fix: Background-propagation cleanup (#30) + configurable backoffLimit (#31)
2 parents 017d23b + 89fed9a commit a557730

22 files changed

Lines changed: 206 additions & 22 deletions

CHANGELOG.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,20 @@
22

33
All notable changes to this project will be documented in this file.
44

5+
## 0.2.10 - 2026-06-12
6+
7+
### Added
8+
9+
- Add `spec.backoffLimit` to `KafkaRestore` and `KafkaBackup` to control pod retries on generated Jobs (including scheduled CronJob runs). Fixes [#31](https://github.com/osodevops/strimzi-backup-operator/issues/31).
10+
11+
### Changed
12+
13+
- Restore Jobs now default to `backoffLimit: 0` (a single attempt, previously 3): restores append to or purge target topics, so retrying a partially completed attempt can duplicate data. Set `spec.backoffLimit` explicitly to opt into retries. Backup Jobs keep the previous default of 3.
14+
15+
### Fixed
16+
17+
- Delete Jobs, CronJobs, and ConfigMaps with explicit Background propagation when a `KafkaBackup`/`KafkaRestore` is deleted. The batch/v1 Job API's legacy default deletion propagation is `Orphan`, which stripped the Job ownerReference from its pods and left Completed pods behind. Fixes [#30](https://github.com/osodevops/strimzi-backup-operator/issues/30).
18+
519
## 0.2.9 - 2026-06-12
620

721
### Fixed

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "kafka-backup-operator"
3-
version = "0.2.9"
3+
version = "0.2.10"
44
edition = "2021"
55
rust-version = "1.88"
66
license = "Apache-2.0"

deploy/crds/kafkabackups.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,12 @@ spec:
9696
required:
9797
- type
9898
type: object
99+
backoffLimit:
100+
description: Number of pod retries before a backup Job is marked failed (`spec.backoffLimit` on generated Jobs, including scheduled CronJob runs). Defaults to 3.
101+
format: int32
102+
minimum: 0.0
103+
nullable: true
104+
type: integer
99105
backup:
100106
description: Backup options (compression, encryption, parallelism)
101107
nullable: true

deploy/crds/kafkarestores.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,12 @@ spec:
9393
required:
9494
- type
9595
type: object
96+
backoffLimit:
97+
description: 'Number of pod retries before the restore Job is marked failed (`spec.backoffLimit` on the generated Job). Defaults to 0 so a restore runs exactly once: restores append to or purge target topics, so a retry of a partially completed attempt can duplicate data and must be opted into deliberately.'
98+
format: int32
99+
minimum: 0.0
100+
nullable: true
101+
type: integer
96102
backupRef:
97103
description: Reference to the source backup
98104
properties:

deploy/helm/strimzi-backup-operator/Chart.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ apiVersion: v2
22
name: strimzi-backup-operator
33
description: Kubernetes operator for Kafka backup and restore, integrated with Strimzi
44
type: application
5-
version: 0.2.9
6-
appVersion: "0.2.9"
5+
version: 0.2.10
6+
appVersion: "0.2.10"
77
home: https://github.com/osodevops/strimzi-backup-operator
88
sources:
99
- https://github.com/osodevops/strimzi-backup-operator

deploy/helm/strimzi-backup-operator/crds/kafkabackups.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,12 @@ spec:
9696
required:
9797
- type
9898
type: object
99+
backoffLimit:
100+
description: Number of pod retries before a backup Job is marked failed (`spec.backoffLimit` on generated Jobs, including scheduled CronJob runs). Defaults to 3.
101+
format: int32
102+
minimum: 0.0
103+
nullable: true
104+
type: integer
99105
backup:
100106
description: Backup options (compression, encryption, parallelism)
101107
nullable: true

deploy/helm/strimzi-backup-operator/crds/kafkarestores.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,12 @@ spec:
9393
required:
9494
- type
9595
type: object
96+
backoffLimit:
97+
description: 'Number of pod retries before the restore Job is marked failed (`spec.backoffLimit` on the generated Job). Defaults to 0 so a restore runs exactly once: restores append to or purge target topics, so a retry of a partially completed attempt can duplicate data and must be opted into deliberately.'
98+
format: int32
99+
minimum: 0.0
100+
nullable: true
101+
type: integer
96102
backupRef:
97103
description: Reference to the source backup
98104
properties:

src/adapters/backup_config.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -507,6 +507,7 @@ mod tests {
507507
resources: None,
508508
template: None,
509509
image: None,
510+
backoff_limit: None,
510511
consumer_groups: None,
511512
};
512513
let mut backup = KafkaBackup::new("test-backup", spec);

src/crd/kafka_backup.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,13 @@ pub struct KafkaBackupSpec {
8989
/// Container image for the backup job (default: osodevops/kafka-backup:v0.15.6)
9090
#[serde(skip_serializing_if = "Option::is_none")]
9191
pub image: Option<String>,
92+
93+
/// Number of pod retries before a backup Job is marked failed
94+
/// (`spec.backoffLimit` on generated Jobs, including scheduled CronJob
95+
/// runs). Defaults to 3.
96+
#[schemars(range(min = 0))]
97+
#[serde(skip_serializing_if = "Option::is_none")]
98+
pub backoff_limit: Option<i32>,
9299
}
93100

94101
/// Backup-specific options

0 commit comments

Comments
 (0)