Code suggestions #8
@ -56,6 +56,14 @@ func (kp *kubeprobes) validate() error {
|
||||
err = errors.Join(err, fmt.Errorf("liveness and readiness probes have the same values (both %q)", kp.pathLive))
|
||||
}
|
||||
|
||||
if len(kp.livenessProbes) == 0 {
|
||||
err = errors.Join(err, fmt.Errorf("no liveness probes defined"))
|
||||
}
|
||||
|
||||
if len(kp.readinessProbes) == 0 {
|
||||
err = errors.Join(err, fmt.Errorf("no readiness probes defined"))
|
||||
}
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user