mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-28 14:07:14 +00:00
add ReadinessGates in pod spec
This commit is contained in:
parent
5da925ad4f
commit
10465ee4a7
@ -2409,6 +2409,12 @@ const (
|
|||||||
TolerationOpEqual TolerationOperator = "Equal"
|
TolerationOpEqual TolerationOperator = "Equal"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
// PodReadinessGate contains the reference to a pod condition
|
||||||
|
type PodReadinessGate struct {
|
||||||
|
// ConditionType refers to a condition in the pod's condition list with matching type.
|
||||||
|
ConditionType PodConditionType
|
||||||
|
}
|
||||||
|
|
||||||
// PodSpec is a description of a pod
|
// PodSpec is a description of a pod
|
||||||
type PodSpec struct {
|
type PodSpec struct {
|
||||||
Volumes []Volume
|
Volumes []Volume
|
||||||
@ -2505,6 +2511,12 @@ type PodSpec struct {
|
|||||||
// configuration based on DNSPolicy.
|
// configuration based on DNSPolicy.
|
||||||
// +optional
|
// +optional
|
||||||
DNSConfig *PodDNSConfig
|
DNSConfig *PodDNSConfig
|
||||||
|
// If specified, all readiness gates will be evaluated for pod readiness.
|
||||||
|
// A pod is ready when all its containers are ready AND
|
||||||
|
// all conditions specified in the readiness gates have status equal to "True"
|
||||||
|
// More info: https://github.com/kubernetes/community/blob/master/keps/sig-network/0007-pod-ready%2B%2B.md
|
||||||
|
// +optional
|
||||||
|
ReadinessGates []PodReadinessGate
|
||||||
}
|
}
|
||||||
|
|
||||||
// HostAlias holds the mapping between IP and hostnames that will be injected as an entry in the
|
// HostAlias holds the mapping between IP and hostnames that will be injected as an entry in the
|
||||||
|
@ -2288,7 +2288,6 @@ const (
|
|||||||
// PodCondition contains details for the current condition of this pod.
|
// PodCondition contains details for the current condition of this pod.
|
||||||
type PodCondition struct {
|
type PodCondition struct {
|
||||||
// Type is the type of the condition.
|
// Type is the type of the condition.
|
||||||
// Currently only Ready.
|
|
||||||
// More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-conditions
|
// More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-conditions
|
||||||
Type PodConditionType `json:"type" protobuf:"bytes,1,opt,name=type,casttype=PodConditionType"`
|
Type PodConditionType `json:"type" protobuf:"bytes,1,opt,name=type,casttype=PodConditionType"`
|
||||||
// Status is the status of the condition.
|
// Status is the status of the condition.
|
||||||
@ -2632,6 +2631,12 @@ const (
|
|||||||
TolerationOpEqual TolerationOperator = "Equal"
|
TolerationOpEqual TolerationOperator = "Equal"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
// PodReadinessGate contains the reference to a pod condition
|
||||||
|
type PodReadinessGate struct {
|
||||||
|
// ConditionType refers to a condition in the pod's condition list with matching type.
|
||||||
|
ConditionType PodConditionType `json:"conditionType" protobuf:"bytes,1,opt,name=conditionType,casttype=PodConditionType"`
|
||||||
|
}
|
||||||
|
|
||||||
// PodSpec is a description of a pod.
|
// PodSpec is a description of a pod.
|
||||||
type PodSpec struct {
|
type PodSpec struct {
|
||||||
// List of volumes that can be mounted by containers belonging to the pod.
|
// List of volumes that can be mounted by containers belonging to the pod.
|
||||||
@ -2796,6 +2801,13 @@ type PodSpec struct {
|
|||||||
// configuration based on DNSPolicy.
|
// configuration based on DNSPolicy.
|
||||||
// +optional
|
// +optional
|
||||||
DNSConfig *PodDNSConfig `json:"dnsConfig,omitempty" protobuf:"bytes,26,opt,name=dnsConfig"`
|
DNSConfig *PodDNSConfig `json:"dnsConfig,omitempty" protobuf:"bytes,26,opt,name=dnsConfig"`
|
||||||
|
|
||||||
|
// If specified, all readiness gates will be evaluated for pod readiness.
|
||||||
|
// A pod is ready when all its containers are ready AND
|
||||||
|
// all conditions specified in the readiness gates have status equal to "True"
|
||||||
|
// More info: https://github.com/kubernetes/community/blob/master/keps/sig-network/0007-pod-ready%2B%2B.md
|
||||||
|
// +optional
|
||||||
|
ReadinessGates []PodReadinessGate `json:"readinessGates,omitempty" protobuf:"bytes,28,opt,name=readinessGates"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// HostAlias holds the mapping between IP and hostnames that will be injected as an entry in the
|
// HostAlias holds the mapping between IP and hostnames that will be injected as an entry in the
|
||||||
|
Loading…
Reference in New Issue
Block a user