Use NodeDiskPressure conditino instead of NodeOutOfDisk
This commit is contained in:
parent
002db2c196
commit
79b4614328
|
|
@ -51,7 +51,7 @@ func BuildReadyConditions() []apiv1.NodeCondition {
|
|||
LastTransitionTime: metav1.Time{Time: lastTransition},
|
||||
},
|
||||
{
|
||||
Type: apiv1.NodeOutOfDisk,
|
||||
Type: apiv1.NodeDiskPressure,
|
||||
Status: apiv1.ConditionFalse,
|
||||
LastTransitionTime: metav1.Time{Time: lastTransition},
|
||||
},
|
||||
|
|
|
|||
|
|
@ -862,7 +862,7 @@ func isNodeStillStarting(node *apiv1.Node) bool {
|
|||
condition.LastTransitionTime.Time.Sub(node.CreationTimestamp.Time) < MaxStatusSettingDelayAfterCreation {
|
||||
return true
|
||||
}
|
||||
if condition.Type == apiv1.NodeOutOfDisk &&
|
||||
if condition.Type == apiv1.NodeDiskPressure &&
|
||||
condition.Status == apiv1.ConditionTrue &&
|
||||
condition.LastTransitionTime.Time.Sub(node.CreationTimestamp.Time) < MaxStatusSettingDelayAfterCreation {
|
||||
return true
|
||||
|
|
|
|||
|
|
@ -771,7 +771,7 @@ func TestIsNodeStillStarting(t *testing.T) {
|
|||
}{
|
||||
{"unready", apiv1.NodeReady, apiv1.ConditionFalse, true},
|
||||
{"readiness unknown", apiv1.NodeReady, apiv1.ConditionUnknown, true},
|
||||
{"out of disk", apiv1.NodeOutOfDisk, apiv1.ConditionTrue, true},
|
||||
{"out of disk", apiv1.NodeDiskPressure, apiv1.ConditionTrue, true},
|
||||
{"network unavailable", apiv1.NodeNetworkUnavailable, apiv1.ConditionTrue, true},
|
||||
{"started", apiv1.NodeReady, apiv1.ConditionTrue, false},
|
||||
}
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@ func GetReadinessState(node *apiv1.Node) (isNodeReady bool, lastTransitionTime t
|
|||
if lastTransitionTime.Before(cond.LastTransitionTime.Time) {
|
||||
lastTransitionTime = cond.LastTransitionTime.Time
|
||||
}
|
||||
case apiv1.NodeOutOfDisk:
|
||||
case apiv1.NodeDiskPressure:
|
||||
if cond.Status == apiv1.ConditionTrue {
|
||||
canNodeBeReady = false
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue