From 535c72e40ea8287f2cf25994558c4642a2ed98e0 Mon Sep 17 00:00:00 2001 From: Jonathan West Date: Tue, 12 Mar 2024 01:51:23 -0400 Subject: [PATCH] Add check for liveness probe HTTP get Signed-off-by: Jonathan West --- controllers/deployment.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/controllers/deployment.go b/controllers/deployment.go index 2b711b3..4831cfa 100644 --- a/controllers/deployment.go +++ b/controllers/deployment.go @@ -326,6 +326,10 @@ func normalizeDeployment(inputParam appsv1.Deployment) (appsv1.Deployment, error return appsv1.Deployment{}, fmt.Errorf("incorrect liveness probe") } + if inputLivenessProbe.ProbeHandler.HTTPGet == nil { + return appsv1.Deployment{}, fmt.Errorf("incorrect http get in liveness probe") + } + if inputReadinessProbe == nil { return appsv1.Deployment{}, fmt.Errorf("incorrect readiness probe") }