From 6812bad2ae34a6467e7cbccfecb4a11c0626db39 Mon Sep 17 00:00:00 2001 From: andreaTP Date: Fri, 17 Jun 2022 12:52:50 +0100 Subject: [PATCH] Review RollingUpdate settings --- .../keycloak/operator/controllers/KeycloakDeployment.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/operator/app/src/main/java/org/keycloak/operator/controllers/KeycloakDeployment.java b/operator/app/src/main/java/org/keycloak/operator/controllers/KeycloakDeployment.java index c97e28a28e..7789448b59 100644 --- a/operator/app/src/main/java/org/keycloak/operator/controllers/KeycloakDeployment.java +++ b/operator/app/src/main/java/org/keycloak/operator/controllers/KeycloakDeployment.java @@ -504,8 +504,9 @@ public class KeycloakDeployment extends OperatorManagedResource implements Statu .endTemplate() .withNewStrategy() .withNewRollingUpdate() - .withMaxSurge(new IntOrString("25%")) - .withMaxUnavailable(new IntOrString("25%")) + // Same defaults as for a StatefulSet: https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#maximum-unavailable-pods + .withNewMaxSurge(1) // maximum number of Pods that can be created over the desired number of Pods + .withNewMaxUnavailable(1) // maximum number of Pods that can be unavailable during the update process .endRollingUpdate() .endStrategy() .endSpec()