Skip to content
This repository was archived by the owner on Jul 13, 2026. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions internal/controller/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,16 @@ const (
LlamaStackStartupProbeFailureThreshold = int32(30)
LlamaStackProbeFailureThreshold = int32(3)

// Health probe settings for the lightspeed-stack container.
Comment thread
umago marked this conversation as resolved.
// The startup probe allows up to 30 failures (300s) for initialization,
// while liveness and readiness probes use a tighter threshold of 3 failures.
LightspeedStackLivenessPath = "/liveness"
LightspeedStackReadinessPath = "/readiness"
LightspeedStackProbePeriodSeconds = int32(10)
LightspeedStackProbeTimeoutSeconds = int32(5)
LightspeedStackStartupProbeFailureThreshold = int32(30)
LightspeedStackProbeFailureThreshold = int32(3)

// Data Exporter
ExporterConfigVolumeName = "exporter-config"
ExporterConfigMountPath = "/etc/config"
Expand Down
3 changes: 2 additions & 1 deletion internal/controller/lcore_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,8 @@ func buildLCoreUserDataCollectionConfig(_ *common_helper.Helper, instance *apiv1

func buildLCoreAuthenticationConfig(_ *common_helper.Helper, _ *apiv1beta1.OpenStackLightspeed) map[string]interface{} {
return map[string]interface{}{
"module": "k8s",
"module": "k8s",
"skip_for_health_probes": true,
}
}

Expand Down
43 changes: 31 additions & 12 deletions internal/controller/lcore_deployment.go
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ func buildLCorePodTemplateSpec(h *common_helper.Helper, ctx context.Context, ins
Ports: []corev1.ContainerPort{{Name: "https", ContainerPort: OpenStackLightspeedAppServerContainerPort}},
VolumeMounts: lightspeedStackMounts,
Env: lsEnvVars,
StartupProbe: buildLightspeedStackStartupProbe(),
LivenessProbe: buildLightspeedStackLivenessProbe(),
ReadinessProbe: buildLightspeedStackReadinessProbe(),
Resources: corev1.ResourceRequirements{
Expand Down Expand Up @@ -651,33 +652,51 @@ func buildLightspeedStackEnvVars(instance *apiv1beta1.OpenStackLightspeed) []cor
return envVars
}

// buildLightspeedStackStartupProbe returns the startup probe for the lightspeed-stack container.
func buildLightspeedStackStartupProbe() *corev1.Probe {
return &corev1.Probe{
ProbeHandler: corev1.ProbeHandler{
HTTPGet: &corev1.HTTPGetAction{
Path: LightspeedStackReadinessPath,
Port: intstr.FromInt32(OpenStackLightspeedAppServerContainerPort),
Scheme: corev1.URISchemeHTTPS,
},
},
PeriodSeconds: LightspeedStackProbePeriodSeconds,
TimeoutSeconds: LightspeedStackProbeTimeoutSeconds,
FailureThreshold: LightspeedStackStartupProbeFailureThreshold,
}
}

// buildLightspeedStackLivenessProbe returns the liveness probe for the lightspeed-stack container.
func buildLightspeedStackLivenessProbe() *corev1.Probe {
return &corev1.Probe{
ProbeHandler: corev1.ProbeHandler{
TCPSocket: &corev1.TCPSocketAction{
Port: intstr.FromInt32(OpenStackLightspeedAppServerContainerPort),
HTTPGet: &corev1.HTTPGetAction{
Path: LightspeedStackLivenessPath,
Port: intstr.FromInt32(OpenStackLightspeedAppServerContainerPort),
Scheme: corev1.URISchemeHTTPS,
},
},
InitialDelaySeconds: 30,
PeriodSeconds: 10,
TimeoutSeconds: 5,
FailureThreshold: 3,
PeriodSeconds: LightspeedStackProbePeriodSeconds,
TimeoutSeconds: LightspeedStackProbeTimeoutSeconds,
FailureThreshold: LightspeedStackProbeFailureThreshold,
}
}

// buildLightspeedStackReadinessProbe returns the readiness probe for the lightspeed-stack container.
func buildLightspeedStackReadinessProbe() *corev1.Probe {
return &corev1.Probe{
ProbeHandler: corev1.ProbeHandler{
TCPSocket: &corev1.TCPSocketAction{
Port: intstr.FromInt32(OpenStackLightspeedAppServerContainerPort),
HTTPGet: &corev1.HTTPGetAction{
Path: LightspeedStackReadinessPath,
Port: intstr.FromInt32(OpenStackLightspeedAppServerContainerPort),
Scheme: corev1.URISchemeHTTPS,
},
},
InitialDelaySeconds: 30,
PeriodSeconds: 10,
TimeoutSeconds: 5,
FailureThreshold: 3,
PeriodSeconds: LightspeedStackProbePeriodSeconds,
TimeoutSeconds: LightspeedStackProbeTimeoutSeconds,
FailureThreshold: LightspeedStackProbeFailureThreshold,
}
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
authentication:
module: k8s
skip_for_health_probes: true
byok_rag:
- rag_id: vs_UUID
vector_db_id: vs_UUID
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
authentication:
module: k8s
skip_for_health_probes: true
byok_rag:
- rag_id: vs_UUID
vector_db_id: vs_UUID
Expand Down
1 change: 1 addition & 0 deletions test/kuttl/common/expected-configs/lightspeed-stack.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
authentication:
module: k8s
skip_for_health_probes: true
byok_rag:
- rag_id: vs_UUID
vector_db_id: vs_UUID
Expand Down
Loading