From 2e7e96c399a37f64e2a64dc3d97526c258c29feb Mon Sep 17 00:00:00 2001 From: dervoeti Date: Tue, 24 Jun 2025 16:07:42 +0200 Subject: [PATCH] fix: workaround for long certificate lifetimes --- CHANGELOG.md | 2 ++ rust/operator-binary/src/restart_controller/pod.rs | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 11477a6..7b97a78 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,6 +20,7 @@ All notable changes to this project will be documented in this file. by `FILE_LOG_DIRECTORY` (or via `--file-log-directory `). - Replace stackable-operator `print_startup_string` with `tracing::info!` with fields. - Version CRDs and bump dependencies ([#353]). +- Limit rescheduling delay to a maximum of 6 months ([#363]). ### Fixed @@ -30,6 +31,7 @@ All notable changes to this project will be documented in this file. [#344]: https://github.com/stackabletech/commons-operator/pull/344 [#349]: https://github.com/stackabletech/commons-operator/pull/349 [#353]: https://github.com/stackabletech/commons-operator/pull/353 +[#363]: https://github.com/stackabletech/commons-operator/pull/363 ## [25.3.0] - 2025-03-21 diff --git a/rust/operator-binary/src/restart_controller/pod.rs b/rust/operator-binary/src/restart_controller/pod.rs index 0d56683..59f5a97 100644 --- a/rust/operator-binary/src/restart_controller/pod.rs +++ b/rust/operator-binary/src/restart_controller/pod.rs @@ -174,6 +174,10 @@ async fn reconcile(pod: Arc>, ctx: Arc) -> Result { + // Clamp the rescheduling delay to a maximum of 6 months to prevent `Action::requeue` from panicking + // This workaround can be removed once https://github.com/kube-rs/kube/issues/1772 is resolved + let time_until_pod_expires = + time_until_pod_expires.min(Duration::from_secs(6 * 30 * 24 * 60 * 60)); tracing::info!( pod.expires_at = ?pod_expires_at, recheck_delay = ?time_until_pod_expires,