mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-31 23:37:01 +00:00
Add terminationGracePeriodSeconds to Probe API
This commit is contained in:
parent
2eb32e930a
commit
9cdd673a8b
@ -2020,6 +2020,17 @@ type Probe struct {
|
||||
// Minimum consecutive failures for the probe to be considered failed after having succeeded.
|
||||
// +optional
|
||||
FailureThreshold int32
|
||||
// Optional duration in seconds the pod needs to terminate gracefully upon probe failure.
|
||||
// The grace period is the duration in seconds after the processes running in the pod are sent
|
||||
// a termination signal and the time when the processes are forcibly halted with a kill signal.
|
||||
// Set this value longer than the expected cleanup time for your process.
|
||||
// If this value is nil, the pod's terminationGracePeriodSeconds will be used. Otherwise, this
|
||||
// value overrides the value provided by the pod spec.
|
||||
// Value must be non-negative integer. The value zero indicates stop immediately via
|
||||
// the kill signal (no opportunity to shut down).
|
||||
// This is an alpha field and requires enabling ProbeTerminationGracePeriod feature gate.
|
||||
// +optional
|
||||
TerminationGracePeriodSeconds *int64
|
||||
}
|
||||
|
||||
// PullPolicy describes a policy for if/when to pull a container image
|
||||
@ -2719,7 +2730,8 @@ type PodSpec struct {
|
||||
// +optional
|
||||
RestartPolicy RestartPolicy
|
||||
// Optional duration in seconds the pod needs to terminate gracefully. May be decreased in delete request.
|
||||
// Value must be non-negative integer. The value zero indicates delete immediately.
|
||||
// Value must be non-negative integer. The value zero indicates stop immediately via the kill
|
||||
// signal (no opportunity to shut down).
|
||||
// If this value is nil, the default grace period will be used instead.
|
||||
// The grace period is the duration in seconds after the processes running in the pod are sent
|
||||
// a termination signal and the time when the processes are forcibly halted with a kill signal.
|
||||
|
@ -2117,6 +2117,17 @@ type Probe struct {
|
||||
// Defaults to 3. Minimum value is 1.
|
||||
// +optional
|
||||
FailureThreshold int32 `json:"failureThreshold,omitempty" protobuf:"varint,6,opt,name=failureThreshold"`
|
||||
// Optional duration in seconds the pod needs to terminate gracefully upon probe failure.
|
||||
// The grace period is the duration in seconds after the processes running in the pod are sent
|
||||
// a termination signal and the time when the processes are forcibly halted with a kill signal.
|
||||
// Set this value longer than the expected cleanup time for your process.
|
||||
// If this value is nil, the pod's terminationGracePeriodSeconds will be used. Otherwise, this
|
||||
// value overrides the value provided by the pod spec.
|
||||
// Value must be non-negative integer. The value zero indicates stop immediately via
|
||||
// the kill signal (no opportunity to shut down).
|
||||
// This is an alpha field and requires enabling ProbeTerminationGracePeriod feature gate.
|
||||
// +optional
|
||||
TerminationGracePeriodSeconds *int64 `json:"terminationGracePeriodSeconds,omitempty" protobuf:"varint,7,opt,name=terminationGracePeriodSeconds"`
|
||||
}
|
||||
|
||||
// PullPolicy describes a policy for if/when to pull a container image
|
||||
@ -2968,7 +2979,8 @@ type PodSpec struct {
|
||||
// +optional
|
||||
RestartPolicy RestartPolicy `json:"restartPolicy,omitempty" protobuf:"bytes,3,opt,name=restartPolicy,casttype=RestartPolicy"`
|
||||
// Optional duration in seconds the pod needs to terminate gracefully. May be decreased in delete request.
|
||||
// Value must be non-negative integer. The value zero indicates delete immediately.
|
||||
// Value must be non-negative integer. The value zero indicates stop immediately via
|
||||
// the kill signal (no opportunity to shut down).
|
||||
// If this value is nil, the default grace period will be used instead.
|
||||
// The grace period is the duration in seconds after the processes running in the pod are sent
|
||||
// a termination signal and the time when the processes are forcibly halted with a kill signal.
|
||||
|
Loading…
Reference in New Issue
Block a user