From 45673ef618cf43dab81b0a01b27ca632aeb07d32 Mon Sep 17 00:00:00 2001 From: Matthieu Neau Date: Wed, 30 Sep 2026 10:53:23 +0200 Subject: [PATCH 1/2] fix(operator): use RollingUpdate for the controller-manager Deployment Recreate scaled the old ReplicaSet to zero before creating any new pod, making the operator (and its CRD conversion webhook) unavailable for the full shutdown + reschedule + readiness window on every chart upgrade. PDBs do not help: they only gate the eviction API, which rolling updates bypass. The operator is leader-elected, so a brief old/new generation overlap during the roll is safe. This restores the chart's pre-#4166 behavior (Kubernetes default RollingUpdate), made explicit with zero allowed unavailability. Fixes #15411 Signed-off-by: Matthieu Neau --- .../components/operator/templates/deployment.yaml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/deploy/helm/charts/platform/components/operator/templates/deployment.yaml b/deploy/helm/charts/platform/components/operator/templates/deployment.yaml index fc5e976a60ca..df216b061c9b 100644 --- a/deploy/helm/charts/platform/components/operator/templates/deployment.yaml +++ b/deploy/helm/charts/platform/components/operator/templates/deployment.yaml @@ -32,7 +32,16 @@ metadata: spec: replicas: {{ .Values.controllerManager.replicas }} strategy: - type: Recreate + # RollingUpdate with zero allowed unavailability: the old ReplicaSet pods + # are only terminated after new (surge) pods become Ready, so DGD + # reconciliation and the CRD conversion webhook stay available across + # chart upgrades. The operator is leader-elected, so a brief overlap of + # old/new generations is safe. See #15411 for the background (Recreate + # took availability to zero on every upgrade). + type: RollingUpdate + rollingUpdate: + maxSurge: 1 + maxUnavailable: 0 selector: matchLabels: control-plane: controller-manager From 513d02059295481a2b05eebf43c2171efad2afb6 Mon Sep 17 00:00:00 2001 From: Matthieu Neau Date: Mon, 5 Oct 2026 14:43:54 +0200 Subject: [PATCH 2/2] fix(operator): keep Recreate for namespace-restricted installs Per review r4165554147: the namespace-scope marker lease is deleted unconditionally on shutdown and assumes a single live restricted operator (lease_manager.go: 'only one operator instance in namespace-restricted mode'). A rolling overlap of old/new restricted pods deletes the shared lease while the replacement is live, and the cluster-wide operator resumes processing the tenant namespace until the replacement's next renewal tick - leader election cannot arbitrate between the two scopes. Keep Recreate for namespaceRestriction.enabled (sequential handover), RollingUpdate (maxSurge 1, maxUnavailable 0) for cluster-wide installs. Cluster-wide overlap remains safe: the operator is leader-elected. Signed-off-by: Matthieu Neau --- .../operator/templates/deployment.yaml | 25 ++++++++++++++----- 1 file changed, 19 insertions(+), 6 deletions(-) diff --git a/deploy/helm/charts/platform/components/operator/templates/deployment.yaml b/deploy/helm/charts/platform/components/operator/templates/deployment.yaml index df216b061c9b..ef309906b43a 100644 --- a/deploy/helm/charts/platform/components/operator/templates/deployment.yaml +++ b/deploy/helm/charts/platform/components/operator/templates/deployment.yaml @@ -32,16 +32,29 @@ metadata: spec: replicas: {{ .Values.controllerManager.replicas }} strategy: - # RollingUpdate with zero allowed unavailability: the old ReplicaSet pods - # are only terminated after new (surge) pods become Ready, so DGD - # reconciliation and the CRD conversion webhook stay available across - # chart upgrades. The operator is leader-elected, so a brief overlap of - # old/new generations is safe. See #15411 for the background (Recreate - # took availability to zero on every upgrade). + # Cluster-wide installations use RollingUpdate with zero allowed + # unavailability: the old ReplicaSet pods are only terminated after new + # (surge) pods become Ready, so DGD reconciliation and the CRD conversion + # webhook stay available across chart upgrades. The operator is + # leader-elected, so a brief overlap of old/new generations is safe. + # See #15411 for the background (Recreate took availability to zero on + # every upgrade). + # + # Namespace-restricted installations keep Recreate: the namespace-scope + # marker lease (LeaseManager.Stop) is deleted unconditionally on shutdown + # and assumes a single live restricted operator (see lease_manager.go: + # "only one operator instance in namespace-restricted mode"). A rolling + # overlap of old/new restricted pods would let the cluster-wide operator + # briefly process the tenant namespace while the replacement is still + # responsible for it (review r4165554147). + {{- if .Values.namespaceRestriction.enabled }} + type: Recreate + {{- else }} type: RollingUpdate rollingUpdate: maxSurge: 1 maxUnavailable: 0 + {{- end }} selector: matchLabels: control-plane: controller-manager