@@ -147,6 +147,7 @@ func buildLCorePodTemplateSpec(h *common_helper.Helper, ctx context.Context, ins
147147 Ports : []corev1.ContainerPort {{Name : "https" , ContainerPort : OpenStackLightspeedAppServerContainerPort }},
148148 VolumeMounts : lightspeedStackMounts ,
149149 Env : lsEnvVars ,
150+ StartupProbe : buildLightspeedStackStartupProbe (),
150151 LivenessProbe : buildLightspeedStackLivenessProbe (),
151152 ReadinessProbe : buildLightspeedStackReadinessProbe (),
152153 Resources : corev1.ResourceRequirements {
@@ -651,33 +652,51 @@ func buildLightspeedStackEnvVars(instance *apiv1beta1.OpenStackLightspeed) []cor
651652 return envVars
652653}
653654
655+ // buildLightspeedStackStartupProbe returns the startup probe for the lightspeed-stack container.
656+ func buildLightspeedStackStartupProbe () * corev1.Probe {
657+ return & corev1.Probe {
658+ ProbeHandler : corev1.ProbeHandler {
659+ HTTPGet : & corev1.HTTPGetAction {
660+ Path : LightspeedStackReadinessPath ,
661+ Port : intstr .FromInt32 (OpenStackLightspeedAppServerContainerPort ),
662+ Scheme : corev1 .URISchemeHTTPS ,
663+ },
664+ },
665+ PeriodSeconds : LightspeedStackProbePeriodSeconds ,
666+ TimeoutSeconds : LightspeedStackProbeTimeoutSeconds ,
667+ FailureThreshold : LightspeedStackStartupProbeFailureThreshold ,
668+ }
669+ }
670+
654671// buildLightspeedStackLivenessProbe returns the liveness probe for the lightspeed-stack container.
655672func buildLightspeedStackLivenessProbe () * corev1.Probe {
656673 return & corev1.Probe {
657674 ProbeHandler : corev1.ProbeHandler {
658- TCPSocket : & corev1.TCPSocketAction {
659- Port : intstr .FromInt32 (OpenStackLightspeedAppServerContainerPort ),
675+ HTTPGet : & corev1.HTTPGetAction {
676+ Path : LightspeedStackLivenessPath ,
677+ Port : intstr .FromInt32 (OpenStackLightspeedAppServerContainerPort ),
678+ Scheme : corev1 .URISchemeHTTPS ,
660679 },
661680 },
662- InitialDelaySeconds : 30 ,
663- PeriodSeconds : 10 ,
664- TimeoutSeconds : 5 ,
665- FailureThreshold : 3 ,
681+ PeriodSeconds : LightspeedStackProbePeriodSeconds ,
682+ TimeoutSeconds : LightspeedStackProbeTimeoutSeconds ,
683+ FailureThreshold : LightspeedStackProbeFailureThreshold ,
666684 }
667685}
668686
669687// buildLightspeedStackReadinessProbe returns the readiness probe for the lightspeed-stack container.
670688func buildLightspeedStackReadinessProbe () * corev1.Probe {
671689 return & corev1.Probe {
672690 ProbeHandler : corev1.ProbeHandler {
673- TCPSocket : & corev1.TCPSocketAction {
674- Port : intstr .FromInt32 (OpenStackLightspeedAppServerContainerPort ),
691+ HTTPGet : & corev1.HTTPGetAction {
692+ Path : LightspeedStackReadinessPath ,
693+ Port : intstr .FromInt32 (OpenStackLightspeedAppServerContainerPort ),
694+ Scheme : corev1 .URISchemeHTTPS ,
675695 },
676696 },
677- InitialDelaySeconds : 30 ,
678- PeriodSeconds : 10 ,
679- TimeoutSeconds : 5 ,
680- FailureThreshold : 3 ,
697+ PeriodSeconds : LightspeedStackProbePeriodSeconds ,
698+ TimeoutSeconds : LightspeedStackProbeTimeoutSeconds ,
699+ FailureThreshold : LightspeedStackProbeFailureThreshold ,
681700 }
682701}
683702
0 commit comments