Skip to content

Commit

Permalink
Increase Zuul Scheduler and Zuul Web Startup Probes Time
Browse files Browse the repository at this point in the history
This change increases the values of the startup probes on Zuul
Scheduler and Zuul Web, this way it allows Zuul Scheduler long
repositories loads, and Zuul Web to wait for Zuul Scheduler to finish.
It sets a total time of 3600s ( 1 hour ) at startup.
Periond of Seconds for each Probe Check
Failure Threshold for the Probe Check allow failures before
terminating and restarting the Pod.

Sources:
https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/
https://kubernetes.io/docs/concepts/configuration/liveness-readiness-startup-probes/
Change-Id: I0a405c5443f0705ea7cb5f7d681d6295dc817ae3
  • Loading branch information
fserucas committed Oct 17, 2024
1 parent e51ef8d commit dc048ef
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
5 changes: 5 additions & 0 deletions controllers/libs/base/probes.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,3 +100,8 @@ func MkStartupHTTPProbe(path string, port int) *apiv1.Probe {
}}
return mkStartupProbe(handler)
}

func SlowStartingProbe(probe *apiv1.Probe) {
probe.PeriodSeconds = 60
probe.FailureThreshold = 60
}
2 changes: 2 additions & 0 deletions controllers/zuul.go
Original file line number Diff line number Diff line change
Expand Up @@ -546,6 +546,7 @@ func (r *SFController) EnsureZuulScheduler(cfg *ini.File) bool {
zs.Spec.Template.Spec.Containers[0].ReadinessProbe = base.MkReadinessHTTPProbe("/health/ready", zuulPrometheusPort)
zs.Spec.Template.Spec.Containers[0].LivenessProbe = base.MkLiveHTTPProbe("/health/live", zuulPrometheusPort)
zs.Spec.Template.Spec.Containers[0].StartupProbe = base.MkStartupHTTPProbe("/health/ready", zuulPrometheusPort)
base.SlowStartingProbe(zs.Spec.Template.Spec.Containers[0].StartupProbe)
zs.Spec.Template.Spec.Containers[0].Ports = []apiv1.ContainerPort{
base.MkContainerPort(zuulPrometheusPort, ZuulPrometheusPortName),
}
Expand Down Expand Up @@ -745,6 +746,7 @@ func (r *SFController) EnsureZuulWeb(cfg *ini.File) bool {
zw.Spec.Template.Spec.Containers[0].ReadinessProbe = base.MkReadinessHTTPProbe("/api/info", zuulWEBPort)
zw.Spec.Template.Spec.Containers[0].LivenessProbe = base.MkLiveHTTPProbe("/api/info", zuulWEBPort)
zw.Spec.Template.Spec.Containers[0].StartupProbe = base.MkStartupHTTPProbe("/api/info", zuulWEBPort)
base.SlowStartingProbe(zw.Spec.Template.Spec.Containers[0].StartupProbe)
zw.Spec.Template.Spec.Containers[0].Ports = []apiv1.ContainerPort{
base.MkContainerPort(zuulPrometheusPort, ZuulPrometheusPortName),
}
Expand Down
1 change: 1 addition & 0 deletions doc/reference/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ All notable changes to this project will be documented in this file.
### Removed

- log forwarding - remove support for the HTTP input.
- zuul - Increased Zuul Scheduler and Zuul Web Startup Probes Time

### Changed
### Fixed
Expand Down

0 comments on commit dc048ef

Please sign in to comment.