From 831a776b4e0bb08ff04b5d98989c5abfcea73cc8 Mon Sep 17 00:00:00 2001 From: David Festal Date: Tue, 13 Aug 2019 19:56:25 +0200 Subject: [PATCH] Inconsistent probes prevented deploying on RHPDS (#67) Signed-off-by: David Festal --- pkg/deploy/deployment_che.go | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/pkg/deploy/deployment_che.go b/pkg/deploy/deployment_che.go index 1fb0cf051..93aaaf184 100644 --- a/pkg/deploy/deployment_che.go +++ b/pkg/deploy/deployment_che.go @@ -112,9 +112,12 @@ func NewCheDeployment(cr *orgv1.CheCluster, cheImage string, cheTag string, cmRe Scheme: corev1.URISchemeHTTP, }, }, + // After POD start, the POD will be seen as ready after a minimum of 15 seconds and we expect it to be seen as ready until a maximum of 200 seconds + // 200 s = InitialDelaySeconds + PeriodSeconds * (FailureThreshold - 1) + TimeoutSeconds InitialDelaySeconds: 25, - FailureThreshold: 5, + FailureThreshold: 18, TimeoutSeconds: 5, + PeriodSeconds: 10, }, LivenessProbe: &corev1.Probe{ Handler: corev1.Handler{ @@ -127,9 +130,11 @@ func NewCheDeployment(cr *orgv1.CheCluster, cheImage string, cheTag string, cmRe Scheme: corev1.URISchemeHTTP, }, }, - InitialDelaySeconds: 50, + // After POD start, don't initiate liveness probe while the POD is still expected to be declared as ready by the readiness probe + InitialDelaySeconds: 200, FailureThreshold: 3, TimeoutSeconds: 3, + PeriodSeconds: 10, }, EnvFrom: []corev1.EnvFromSource{ {