@@ -490,7 +490,7 @@ type ProbesConfiguration struct {
490490 Startup * ProbeWithStrategy `json:"startup,omitempty"`
491491
492492 // The liveness probe configuration
493- Liveness * Probe `json:"liveness,omitempty"`
493+ Liveness * LivenessProbe `json:"liveness,omitempty"`
494494
495495 // The readiness probe configuration
496496 Readiness * ProbeWithStrategy `json:"readiness,omitempty"`
@@ -568,6 +568,39 @@ type Probe struct {
568568 TerminationGracePeriodSeconds * int64 `json:"terminationGracePeriodSeconds,omitempty"`
569569}
570570
571+ // LivenessProbe is the configuration of the liveness probe
572+ type LivenessProbe struct {
573+ // Probe is the standard probe configuration
574+ Probe `json:",inline"`
575+
576+ // Configure the feature that extends the liveness probe for a primary
577+ // instance. In addition to the basic checks, this verifies whether the
578+ // primary is isolated from the Kubernetes API server and from its
579+ // replicas, ensuring that it can be safely shut down if network
580+ // partition or API unavailability is detected. Enabled by default.
581+ // +optional
582+ IsolationCheck * IsolationCheckConfiguration `json:"isolationCheck,omitempty"`
583+ }
584+
585+ // IsolationCheckConfiguration contains the configuration for the isolation check
586+ // functionality in the liveness probe
587+ type IsolationCheckConfiguration struct {
588+ // Whether primary isolation checking is enabled for the liveness probe
589+ // +optional
590+ // +kubebuilder:default:=true
591+ Enabled * bool `json:"enabled,omitempty"`
592+
593+ // Timeout in milliseconds for requests during the primary isolation check
594+ // +optional
595+ // +kubebuilder:default:=1000
596+ RequestTimeout int `json:"requestTimeout,omitempty"`
597+
598+ // Timeout in milliseconds for connections during the primary isolation check
599+ // +optional
600+ // +kubebuilder:default:=1000
601+ ConnectionTimeout int `json:"connectionTimeout,omitempty"`
602+ }
603+
571604const (
572605 // PhaseSwitchover when a cluster is changing the primary node
573606 PhaseSwitchover = "Switchover in progress"
0 commit comments