From 8261ea4fcf7b306293fc73efddcc9f508a853a20 Mon Sep 17 00:00:00 2001 From: Andrei Kvapil Date: Sun, 18 Jan 2026 23:12:09 +0100 Subject: [PATCH] fix(kubernetes): increase kube-apiserver startup probe threshold Increase startupProbe.failureThreshold from 3 to 30 for kube-apiserver container. The default 30 seconds (3 failures * 10s period) is often insufficient for apiserver to complete RBAC bootstrap, especially under load or with slower etcd connections. This change gives kube-apiserver up to 300 seconds to initialize, preventing unnecessary CrashLoopBackOff cycles. Co-Authored-By: Claude Signed-off-by: Andrei Kvapil --- .../increase-startup-probe-threshold.diff | 31 +++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 packages/system/kamaji/images/kamaji/patches/increase-startup-probe-threshold.diff diff --git a/packages/system/kamaji/images/kamaji/patches/increase-startup-probe-threshold.diff b/packages/system/kamaji/images/kamaji/patches/increase-startup-probe-threshold.diff new file mode 100644 index 000000000..1938c9f68 --- /dev/null +++ b/packages/system/kamaji/images/kamaji/patches/increase-startup-probe-threshold.diff @@ -0,0 +1,31 @@ +diff --git a/internal/builders/controlplane/deployment.go b/internal/builders/controlplane/deployment.go +index e7f0b88..d67a851 100644 +--- a/internal/builders/controlplane/deployment.go ++++ b/internal/builders/controlplane/deployment.go +@@ -376,7 +376,7 @@ func (d Deployment) buildScheduler(podSpec *corev1.PodSpec, tenantControlPlane k + TimeoutSeconds: 1, + PeriodSeconds: 10, + SuccessThreshold: 1, +- FailureThreshold: 3, ++ FailureThreshold: 30, + } + + switch { +@@ -469,7 +469,7 @@ func (d Deployment) buildControllerManager(podSpec *corev1.PodSpec, tenantContro + TimeoutSeconds: 1, + PeriodSeconds: 10, + SuccessThreshold: 1, +- FailureThreshold: 3, ++ FailureThreshold: 30, + } + switch { + case tenantControlPlane.Spec.ControlPlane.Deployment.Resources == nil: +@@ -600,7 +600,7 @@ func (d Deployment) buildKubeAPIServer(podSpec *corev1.PodSpec, tenantControlPla + TimeoutSeconds: 1, + PeriodSeconds: 10, + SuccessThreshold: 1, +- FailureThreshold: 3, ++ FailureThreshold: 30, + } + podSpec.Containers[index].ImagePullPolicy = corev1.PullAlways + // Volume mounts