Skip to content

Commit cd49d27

Browse files
Merge pull request #103245 from wzshiming/fix/prober-termination
Add validation for Prober TerminationGracePeriodSeconds Kubernetes-commit: e375563732a6f5e4a981300f5776b3aa456956a7
2 parents af0a862 + 8479309 commit cd49d27

File tree

3 files changed

+3
-1
lines changed

3 files changed

+3
-1
lines changed

core/v1/generated.proto

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

core/v1/types.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2151,6 +2151,7 @@ type Probe struct {
21512151
// Value must be non-negative integer. The value zero indicates stop immediately via
21522152
// the kill signal (no opportunity to shut down).
21532153
// This is an alpha field and requires enabling ProbeTerminationGracePeriod feature gate.
2154+
// Minimum value is 1. spec.terminationGracePeriodSeconds is used if unset.
21542155
// +optional
21552156
TerminationGracePeriodSeconds *int64 `json:"terminationGracePeriodSeconds,omitempty" protobuf:"varint,7,opt,name=terminationGracePeriodSeconds"`
21562157
}

core/v1/types_swagger_doc_generated.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1775,7 +1775,7 @@ var map_Probe = map[string]string{
17751775
"periodSeconds": "How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1.",
17761776
"successThreshold": "Minimum consecutive successes for the probe to be considered successful after having failed. Defaults to 1. Must be 1 for liveness and startup. Minimum value is 1.",
17771777
"failureThreshold": "Minimum consecutive failures for the probe to be considered failed after having succeeded. Defaults to 3. Minimum value is 1.",
1778-
"terminationGracePeriodSeconds": "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.",
1778+
"terminationGracePeriodSeconds": "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. Minimum value is 1. spec.terminationGracePeriodSeconds is used if unset.",
17791779
}
17801780

17811781
func (Probe) SwaggerDoc() map[string]string {

0 commit comments

Comments
 (0)