From 7bdb4d79e8a5527a0594a7fa8d215286d6df6d82 Mon Sep 17 00:00:00 2001 From: Martin Gencur Date: Fri, 9 Aug 2024 10:18:52 +0200 Subject: [PATCH] Add different types of startup probes to E2E test --- .../multicontainer_readiness_test.go | 28 +++++++++++++++++-- 1 file changed, 25 insertions(+), 3 deletions(-) diff --git a/test/e2e/multicontainerprobing/multicontainer_readiness_test.go b/test/e2e/multicontainerprobing/multicontainer_readiness_test.go index 75cc56d7e985..9d497105b5fd 100644 --- a/test/e2e/multicontainerprobing/multicontainer_readiness_test.go +++ b/test/e2e/multicontainerprobing/multicontainer_readiness_test.go @@ -171,11 +171,18 @@ func TestMultiContainerReadinessDifferentProbeTypes(t *testing.T) { Ports: []corev1.ContainerPort{{ ContainerPort: 8080, }}, - }, { // Sidecar with TCPSocket readiness and liveness probes. + }, { // Sidecar with TCPSocket startup, readiness and liveness probes. Image: pkgTest.ImagePath(names.Sidecars[0]), Env: []corev1.EnvVar{ {Name: "PORT", Value: "8881"}, }, + StartupProbe: &corev1.Probe{ + ProbeHandler: corev1.ProbeHandler{ + TCPSocket: &corev1.TCPSocketAction{ + Port: intstr.FromInt32(8881), + }, + }, + }, ReadinessProbe: &corev1.Probe{ ProbeHandler: corev1.ProbeHandler{ TCPSocket: &corev1.TCPSocketAction{ @@ -190,11 +197,19 @@ func TestMultiContainerReadinessDifferentProbeTypes(t *testing.T) { }, }, }, - }, { // Sidecar with HTTPGet readiness and Exec liveness probes. + }, { // Sidecar with HTTPGet startup, HTTPGet readiness and Exec liveness probes. Image: pkgTest.ImagePath(names.Sidecars[1]), Env: []corev1.EnvVar{ {Name: "PORT", Value: "8882"}, }, + StartupProbe: &corev1.Probe{ + ProbeHandler: corev1.ProbeHandler{ + HTTPGet: &corev1.HTTPGetAction{ + Path: "/healthz/readiness", + Port: intstr.FromInt32(8882), + }, + }, + }, ReadinessProbe: &corev1.Probe{ ProbeHandler: corev1.ProbeHandler{ HTTPGet: &corev1.HTTPGetAction{ @@ -210,11 +225,18 @@ func TestMultiContainerReadinessDifferentProbeTypes(t *testing.T) { }, }, }, - }, { // Sidecar with GRPC readiness and liveness probes. + }, { // Sidecar with GRPC startup, readiness and liveness probes. Image: pkgTest.ImagePath(names.Sidecars[2]), Env: []corev1.EnvVar{ {Name: "PORT", Value: "8883"}, }, + StartupProbe: &corev1.Probe{ + ProbeHandler: corev1.ProbeHandler{ + GRPC: &corev1.GRPCAction{ + Port: 8883, + }, + }, + }, ReadinessProbe: &corev1.Probe{ ProbeHandler: corev1.ProbeHandler{ GRPC: &corev1.GRPCAction{