diff --git a/cmd/thv-operator/controllers/mcpremoteproxy_deployment.go b/cmd/thv-operator/controllers/mcpremoteproxy_deployment.go index 591cdc04a1..67e195575c 100644 --- a/cmd/thv-operator/controllers/mcpremoteproxy_deployment.go +++ b/cmd/thv-operator/controllers/mcpremoteproxy_deployment.go @@ -82,6 +82,7 @@ func (r *MCPRemoteProxyReconciler) deploymentForMCPRemoteProxy( VolumeMounts: volumeMounts, Resources: resources, Ports: r.buildContainerPorts(proxy), + StartupProbe: ctrlutil.BuildHealthProbe("/health", "http", 0, 5, 3, 18), LivenessProbe: ctrlutil.BuildHealthProbe("/health", "http", 30, 10, 5, 3), ReadinessProbe: ctrlutil.BuildHealthProbe("/health", "http", 15, 5, 3, 3), SecurityContext: containerSecurityContext, diff --git a/cmd/thv-operator/controllers/mcpremoteproxy_deployment_test.go b/cmd/thv-operator/controllers/mcpremoteproxy_deployment_test.go index 91d2e8e462..c16d147c27 100644 --- a/cmd/thv-operator/controllers/mcpremoteproxy_deployment_test.go +++ b/cmd/thv-operator/controllers/mcpremoteproxy_deployment_test.go @@ -76,6 +76,7 @@ func TestDeploymentForMCPRemoteProxy(t *testing.T) { assert.Equal(t, "http", container.Ports[0].Name) // Verify health probes + assert.NotNil(t, container.StartupProbe) assert.NotNil(t, container.LivenessProbe) assert.NotNil(t, container.ReadinessProbe) assert.Equal(t, "/health", container.LivenessProbe.HTTPGet.Path) diff --git a/cmd/thv-operator/controllers/mcpserver_controller.go b/cmd/thv-operator/controllers/mcpserver_controller.go index 4b31a56150..e2579d771b 100644 --- a/cmd/thv-operator/controllers/mcpserver_controller.go +++ b/cmd/thv-operator/controllers/mcpserver_controller.go @@ -1333,6 +1333,17 @@ func (r *MCPServerReconciler) deploymentForMCPServer( Name: "http", Protocol: corev1.ProtocolTCP, }}, + StartupProbe: &corev1.Probe{ + ProbeHandler: corev1.ProbeHandler{ + HTTPGet: &corev1.HTTPGetAction{ + Path: "/health", + Port: intstr.FromString("http"), + }, + }, + PeriodSeconds: 5, + TimeoutSeconds: 3, + FailureThreshold: 18, + }, LivenessProbe: &corev1.Probe{ ProbeHandler: corev1.ProbeHandler{ HTTPGet: &corev1.HTTPGetAction{