Removes the initial delay seconds and adds a startup probe (#21884)
Adjusted the thresholds and delays accordingly Closes #21111
This commit is contained in:
parent
5eb505aba5
commit
9b0f4fb581
1 changed files with 15 additions and 6 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue