Code suggestions #8

Merged
Piotr Icikowski merged 4 commits from refactor into devel 2024-03-02 16:30:27 +01:00
Showing only changes of commit 82b6034625 - Show all commits

View File

@ -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
}