feat(validation): add empty probe lists validation
This commit is contained in:
parent
ea92b2979c
commit
82b6034625
@ -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