Skip to content

Commit

Permalink
Add check for liveness probe HTTP get
Browse files Browse the repository at this point in the history
Signed-off-by: Jonathan West <[email protected]>
  • Loading branch information
jgwest committed Mar 12, 2024
1 parent f82834e commit 535c72e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions controllers/deployment.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
}
Expand Down

0 comments on commit 535c72e

Please sign in to comment.