ensureCustomProbesConfiguration applies the custom probe configuration if specified inside the cluster specification
(cluster *apiv1.Cluster, container *corev1.Container)
| 327 | // ensureCustomProbesConfiguration applies the custom probe configuration |
| 328 | // if specified inside the cluster specification |
| 329 | func ensureCustomProbesConfiguration(cluster *apiv1.Cluster, container *corev1.Container) { |
| 330 | // No probes configuration |
| 331 | if cluster.Spec.Probes == nil { |
| 332 | return |
| 333 | } |
| 334 | |
| 335 | // There's no need to check for nils here because a nil probe specification |
| 336 | // will result in no change in the Kubernetes probe. |
| 337 | cluster.Spec.Probes.Liveness.ApplyInto(container.LivenessProbe) |
| 338 | cluster.Spec.Probes.Readiness.ApplyInto(container.ReadinessProbe) |
| 339 | cluster.Spec.Probes.Startup.ApplyInto(container.StartupProbe) |
| 340 | } |
| 341 | |
| 342 | // getFailureThreshold get the startup probe failure threshold |
| 343 | // FAILURE_THRESHOLD = ceil(startDelay / periodSeconds) and minimum value is 1 |
no test coverage detected