mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-04 23:17:50 +00:00
Node is NotReady until the Route is created
This commit is contained in:
committed by
Wojciech Tyczynski
parent
1cb088857b
commit
7bdf480340
@@ -95,8 +95,25 @@ func GetPodReadyCondition(status PodStatus) *PodCondition {
|
||||
// GetPodCondition extracts the provided condition from the given status and returns that.
|
||||
// Returns nil and -1 if the condition is not present, and the the index of the located condition.
|
||||
func GetPodCondition(status *PodStatus, conditionType PodConditionType) (int, *PodCondition) {
|
||||
for i, c := range status.Conditions {
|
||||
if c.Type == conditionType {
|
||||
if status == nil {
|
||||
return -1, nil
|
||||
}
|
||||
for i := range status.Conditions {
|
||||
if status.Conditions[i].Type == conditionType {
|
||||
return i, &status.Conditions[i]
|
||||
}
|
||||
}
|
||||
return -1, nil
|
||||
}
|
||||
|
||||
// GetNodeCondition extracts the provided condition from the given status and returns that.
|
||||
// Returns nil and -1 if the condition is not present, and the the index of the located condition.
|
||||
func GetNodeCondition(status *NodeStatus, conditionType NodeConditionType) (int, *NodeCondition) {
|
||||
if status == nil {
|
||||
return -1, nil
|
||||
}
|
||||
for i := range status.Conditions {
|
||||
if status.Conditions[i].Type == conditionType {
|
||||
return i, &status.Conditions[i]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2009,6 +2009,8 @@ const (
|
||||
NodeOutOfDisk NodeConditionType = "OutOfDisk"
|
||||
// NodeMemoryPressure means the kubelet is under pressure due to insufficient available memory.
|
||||
NodeMemoryPressure NodeConditionType = "MemoryPressure"
|
||||
// NodeNetworkingReady means that network for the node is correctly configured.
|
||||
NodeNetworkingReady NodeConditionType = "NetworkingReady"
|
||||
)
|
||||
|
||||
type NodeCondition struct {
|
||||
|
||||
@@ -2412,6 +2412,8 @@ const (
|
||||
NodeOutOfDisk NodeConditionType = "OutOfDisk"
|
||||
// NodeMemoryPressure means the kubelet is under pressure due to insufficient available memory.
|
||||
NodeMemoryPressure NodeConditionType = "MemoryPressure"
|
||||
// NodeNetworkingReady means that network for the node is correctly configured.
|
||||
NodeNetworkingReady NodeConditionType = "NetworkingReady"
|
||||
)
|
||||
|
||||
// NodeCondition contains condition infromation for a node.
|
||||
|
||||
Reference in New Issue
Block a user