Skip to content

Commit

Permalink
Change initialDelay of startupProbe to the failureThreshold
Browse files Browse the repository at this point in the history
It seems that 30 seconds which were set before was not enough
to generate SSL certificate and start osp-httpd container in the POD.
Problem was visible for example when this was deployed locally on dev
machine.
To avoid that problem, and don't need to wait for livenessProbe to start
for too long time, this patch removes initialDelay parameter of the
startupProbe and instead sets:

    failureThreshold: 12
    periodSeconds: 10

That way startupProbe can fail 12 times before container will be
restarted. But checks will be performed every 10 seconds and first
successful check will stop startupProbe and start livenessProbe.

As livenessProbe will be always started after successful check of the
startupProbe we don't need initialDelay there at all so it's removed
also.
  • Loading branch information
slawqo committed Dec 15, 2023
1 parent 67372c9 commit c0785be
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions pkg/openstackprovisionserver/deployment.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,14 @@ func Deployment(

startupProbe := &corev1.Probe{
// TODO might need tuning
TimeoutSeconds: 5,
PeriodSeconds: 3,
InitialDelaySeconds: 30,
TimeoutSeconds: 5,
PeriodSeconds: 10,
FailureThreshold: 12,
}
livenessProbe := &corev1.Probe{
// TODO might need tuning
TimeoutSeconds: 5,
PeriodSeconds: 3,
InitialDelaySeconds: 3,
TimeoutSeconds: 5,
PeriodSeconds: 3,
}
readinessProbe := &corev1.Probe{
// TODO might need tuning
Expand Down

0 comments on commit c0785be

Please sign in to comment.