Repository navigation
Operator: optional minReadySeconds for the Keycloak StatefulSet (spec.update.minReadySeconds) #55657
Closed
IsraelDahanIvix
started this conversation in
Ideas
Replies: 1 comment
|
Closing since the scope of what is being proposed is sufficiently narrow to just discuss on the issue / PR. |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Related issue: #55656
I would like to contribute an optional
minReadySecondssetting for the Keycloak CR and I am asking for feedback before I open the pull request, as the contributing guide asks.Problem. With
spec.update.strategy: Autoand two instances behind a cloud load balancer, a rolling update returns HTTP 503 for several seconds on each pod swap: the StatefulSet controller replaces the next pod as soon as the new one is Ready, while the load balancer still has no healthy backend. In our tests (Keycloak 26.8.1, GKE, Gateway API with a regional internal Application Load Balancer) the errors were 12, 10 and 5 requests with the usual mitigations (apreStopsleep, a PodDisruptionBudget, a faster health check), and 0 errors in 483 requests withminReadySeconds: 20set on the StatefulSet. Details and the load balancer log are in the issue.Proposal.
spec.update.minReadySeconds(minimum 0) toUpdateSpec.KeycloakDeploymentDependentResource, copy it toStatefulSet.spec.minReadySecondsonly when it is set. Without it nothing changes.docs/guides/operator/rolling-updates.adoc(a load balancer in front of the pods usually needs a few seconds after Ready), and add a unit test for the field and an integration test next toUpdateTest.readyReplicas, notavailableReplicas(the status thatminReadySecondsdelays), so the CR's Ready condition and rolling-update detection should be unaffected.Questions.
spec.updatethe right place, or would you preferspec.scheduling?spec.update.strategyandrevision?I have a working local implementation plan and will send a draft pull request that references the issue and this discussion unless you would rather I wait for feedback first.
All reactions