Removes the initial delay seconds and adds a startup probe (#21884)

Adjusted the thresholds and delays accordingly

Closes #21111
This commit is contained in:
Steven Hawkins 2023-07-26 04:48:54 -04:00 committed by GitHub
parent 5eb505aba5
commit 9b0f4fb581
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -241,9 +241,8 @@ public class KeycloakDeployment extends OperatorManagedResource<StatefulSet> imp
if (!containerBuilder.hasReadinessProbe()) {
containerBuilder.withNewReadinessProbe()
.withInitialDelaySeconds(20)
.withPeriodSeconds(2)
.withFailureThreshold(250)
.withPeriodSeconds(10)
.withFailureThreshold(3)
.withNewHttpGet()
.withScheme(protocol)
.withNewPort(kcPort)
@ -253,9 +252,8 @@ public class KeycloakDeployment extends OperatorManagedResource<StatefulSet> imp
}
if (!containerBuilder.hasLivenessProbe()) {
containerBuilder.withNewLivenessProbe()
.withInitialDelaySeconds(20)
.withPeriodSeconds(2)
.withFailureThreshold(150)
.withPeriodSeconds(10)
.withFailureThreshold(3)
.withNewHttpGet()
.withScheme(protocol)
.withNewPort(kcPort)
@ -263,6 +261,17 @@ public class KeycloakDeployment extends OperatorManagedResource<StatefulSet> imp
.endHttpGet()
.endLivenessProbe();
}
if (!containerBuilder.hasStartupProbe()) {
containerBuilder.withNewStartupProbe()
.withPeriodSeconds(1)
.withFailureThreshold(600)
.withNewHttpGet()
.withScheme(protocol)
.withNewPort(kcPort)
.withPath(kcRelativePath + "health/started")
.endHttpGet()
.endStartupProbe();
}
// add in ports - there's no merging being done here
StatefulSet baseDeployment = containerBuilder