api changes
This commit is contained in:
		| @@ -2150,6 +2150,12 @@ type ExecAction struct { | ||||
| 	Command []string | ||||
| } | ||||
|  | ||||
| // SleepAction describes a "sleep" action. | ||||
| type SleepAction struct { | ||||
| 	// Seconds is the number of seconds to sleep. | ||||
| 	Seconds int64 | ||||
| } | ||||
|  | ||||
| // Probe describes a health check to be performed against a container to determine whether it is | ||||
| // alive or ready to receive traffic. | ||||
| type Probe struct { | ||||
| @@ -2432,6 +2438,10 @@ type LifecycleHandler struct { | ||||
| 	// lifecycle hooks will fail in runtime when tcp handler is specified. | ||||
| 	// +optional | ||||
| 	TCPSocket *TCPSocketAction | ||||
| 	// Sleep represents the duration that the container should sleep before being terminated. | ||||
| 	// +featureGate=PodLifecycleSleepAction | ||||
| 	// +optional | ||||
| 	Sleep *SleepAction | ||||
| } | ||||
|  | ||||
| type GRPCAction struct { | ||||
|   | ||||
| @@ -636,6 +636,13 @@ const ( | ||||
| 	// Adds pod.status.hostIPs and downward API | ||||
| 	PodHostIPs featuregate.Feature = "PodHostIPs" | ||||
|  | ||||
| 	// owner: @AxeZhan | ||||
| 	// kep: http://kep.k8s.io/3960 | ||||
| 	// alpha: v1.29 | ||||
| 	// | ||||
| 	// Enables SleepAction in container lifecycle hooks | ||||
| 	PodLifecycleSleepAction featuregate.Feature = "PodLifecycleSleepAction" | ||||
|  | ||||
| 	// owner: @Huang-Wei | ||||
| 	// kep: https://kep.k8s.io/3521 | ||||
| 	// alpha: v1.26 | ||||
| @@ -1063,6 +1070,8 @@ var defaultKubernetesFeatureGates = map[featuregate.Feature]featuregate.FeatureS | ||||
|  | ||||
| 	PodHostIPs: {Default: false, PreRelease: featuregate.Alpha}, | ||||
|  | ||||
| 	PodLifecycleSleepAction: {Default: false, PreRelease: featuregate.Alpha}, | ||||
|  | ||||
| 	PodSchedulingReadiness: {Default: true, PreRelease: featuregate.Beta}, | ||||
|  | ||||
| 	ProbeTerminationGracePeriod: {Default: true, PreRelease: featuregate.GA, LockToDefault: true}, // remove in 1.29 | ||||
|   | ||||
| @@ -2272,6 +2272,12 @@ type ExecAction struct { | ||||
| 	Command []string `json:"command,omitempty" protobuf:"bytes,1,rep,name=command"` | ||||
| } | ||||
|  | ||||
| // SleepAction describes a "sleep" action. | ||||
| type SleepAction struct { | ||||
| 	// Seconds is the number of seconds to sleep. | ||||
| 	Seconds int64 `json:"seconds" protobuf:"bytes,1,opt,name=seconds"` | ||||
| } | ||||
|  | ||||
| // Probe describes a health check to be performed against a container to determine whether it is | ||||
| // alive or ready to receive traffic. | ||||
| type Probe struct { | ||||
| @@ -2667,6 +2673,10 @@ type LifecycleHandler struct { | ||||
| 	// lifecycle hooks will fail in runtime when tcp handler is specified. | ||||
| 	// +optional | ||||
| 	TCPSocket *TCPSocketAction `json:"tcpSocket,omitempty" protobuf:"bytes,3,opt,name=tcpSocket"` | ||||
| 	// Sleep represents the duration that the container should sleep before being terminated. | ||||
| 	// +featureGate=PodLifecycleSleepAction | ||||
| 	// +optional | ||||
| 	Sleep *SleepAction `json:"sleep,omitempty" protobuf:"bytes,4,opt,name=sleep"` | ||||
| } | ||||
|  | ||||
| // Lifecycle describes actions that the management system should take in response to container lifecycle | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 AxeZhan
					AxeZhan