@@ -476,6 +476,62 @@ type ClusterSpec struct {
476476 // any plugin to be loaded with the corresponding configuration
477477 // +optional
478478 Plugins PluginConfigurationList `json:"plugins,omitempty"`
479+
480+ // The configuration of the probes to be injected
481+ // in the PostgreSQL Pods.
482+ // +optional
483+ Probes * ProbesConfiguration `json:"probes,omitempty"`
484+ }
485+
486+ // ProbesConfiguration represent the configuration for the probes
487+ // to be injected in the PostgreSQL Pods
488+ type ProbesConfiguration struct {
489+ // The startup probe configuration
490+ Startup * Probe `json:"startup,omitempty"`
491+
492+ // The liveness probe configuration
493+ Liveness * Probe `json:"liveness,omitempty"`
494+
495+ // The readiness probe configuration
496+ Readiness * Probe `json:"readiness,omitempty"`
497+ }
498+
499+ // Probe describes a health check to be performed against a container to determine whether it is
500+ // alive or ready to receive traffic.
501+ type Probe struct {
502+ // Number of seconds after the container has started before liveness probes are initiated.
503+ // More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes
504+ // +optional
505+ InitialDelaySeconds int32 `json:"initialDelaySeconds,omitempty"`
506+ // Number of seconds after which the probe times out.
507+ // Defaults to 1 second. Minimum value is 1.
508+ // More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes
509+ // +optional
510+ TimeoutSeconds int32 `json:"timeoutSeconds,omitempty"`
511+ // How often (in seconds) to perform the probe.
512+ // Default to 10 seconds. Minimum value is 1.
513+ // +optional
514+ PeriodSeconds int32 `json:"periodSeconds,omitempty"`
515+ // Minimum consecutive successes for the probe to be considered successful after having failed.
516+ // Defaults to 1. Must be 1 for liveness and startup. Minimum value is 1.
517+ // +optional
518+ SuccessThreshold int32 `json:"successThreshold,omitempty"`
519+ // Minimum consecutive failures for the probe to be considered failed after having succeeded.
520+ // Defaults to 3. Minimum value is 1.
521+ // +optional
522+ FailureThreshold int32 `json:"failureThreshold,omitempty"`
523+ // Optional duration in seconds the pod needs to terminate gracefully upon probe failure.
524+ // The grace period is the duration in seconds after the processes running in the pod are sent
525+ // a termination signal and the time when the processes are forcibly halted with a kill signal.
526+ // Set this value longer than the expected cleanup time for your process.
527+ // If this value is nil, the pod's terminationGracePeriodSeconds will be used. Otherwise, this
528+ // value overrides the value provided by the pod spec.
529+ // Value must be non-negative integer. The value zero indicates stop immediately via
530+ // the kill signal (no opportunity to shut down).
531+ // This is a beta field and requires enabling ProbeTerminationGracePeriod feature gate.
532+ // Minimum value is 1. spec.terminationGracePeriodSeconds is used if unset.
533+ // +optional
534+ TerminationGracePeriodSeconds * int64 `json:"terminationGracePeriodSeconds,omitempty"`
479535}
480536
481537// PluginConfigurationList represent a set of plugin with their
0 commit comments