mirror of
https://forge.liiib.re/indiehost/libre.sh/libre.sh.git
synced 2024-12-27 06:06:41 +00:00
feat(lool): add probes
This commit is contained in:
parent
272e39ffee
commit
69b2dcf7f9
1 changed files with 28 additions and 0 deletions
|
@ -50,6 +50,13 @@ func (r *LibreOfficeOnlineReconciler) reconcileAppStatfuleSet(ctx context.Contex
|
|||
sts.Spec.Replicas = &replicas
|
||||
}
|
||||
|
||||
probeHandler := corev1.ProbeHandler{
|
||||
HTTPGet: &corev1.HTTPGetAction{
|
||||
Path: "/",
|
||||
Port: intstr.FromString("http"),
|
||||
},
|
||||
}
|
||||
|
||||
sts.Spec.ServiceName = lshr.GetResourceName(lool, component)
|
||||
sts.Spec.Template.Spec.Containers = []corev1.Container{
|
||||
{
|
||||
|
@ -72,6 +79,27 @@ func (r *LibreOfficeOnlineReconciler) reconcileAppStatfuleSet(ctx context.Contex
|
|||
corev1.ResourceMemory: resource.MustParse("5Gi"),
|
||||
},
|
||||
},
|
||||
StartupProbe: &corev1.Probe{
|
||||
ProbeHandler: probeHandler,
|
||||
FailureThreshold: 30,
|
||||
PeriodSeconds: 3,
|
||||
},
|
||||
ReadinessProbe: &corev1.Probe{
|
||||
ProbeHandler: probeHandler,
|
||||
InitialDelaySeconds: 0,
|
||||
PeriodSeconds: 10,
|
||||
TimeoutSeconds: 30,
|
||||
SuccessThreshold: 1,
|
||||
FailureThreshold: 2,
|
||||
},
|
||||
LivenessProbe: &corev1.Probe{
|
||||
ProbeHandler: probeHandler,
|
||||
InitialDelaySeconds: 0,
|
||||
PeriodSeconds: 10,
|
||||
TimeoutSeconds: 30,
|
||||
SuccessThreshold: 1,
|
||||
FailureThreshold: 4,
|
||||
},
|
||||
Env: []corev1.EnvVar{
|
||||
{Name: "DICTIONARIES", Value: "fr_FR en_GB en_US"},
|
||||
{Name: "LANGUAGE", Value: "fr en"},
|
||||
|
|
Loading…
Reference in a new issue