Skip to content

Commit cabe783

Browse files
committed
fix: workaround for long certificate lifetimes
1 parent 066712d commit cabe783

File tree

1 file changed

+3
-0
lines changed
  • rust/operator-binary/src/restart_controller

1 file changed

+3
-0
lines changed

rust/operator-binary/src/restart_controller/pod.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,9 @@ async fn reconcile(pod: Arc<PartialObjectMeta<Pod>>, ctx: Arc<Ctx>) -> Result<Ac
174174
}
175175

176176
Some(Ok(time_until_pod_expires)) => {
177+
// Clamp the rescheduling delay to a maximum of 6 months to prevent `Action::requeue` from panicking
178+
// This workaround can be removed once https://github.com/kube-rs/kube/issues/1772 is resolved
179+
let time_until_pod_expires = time_until_pod_expires.min(Duration::from_secs(6 * 30 * 24 * 60 * 60));
177180
tracing::info!(
178181
pod.expires_at = ?pod_expires_at,
179182
recheck_delay = ?time_until_pod_expires,

0 commit comments

Comments
 (0)