Remove ConditionSchedulable
This commit is contained in:
@@ -482,11 +482,17 @@ func printSecretList(list *api.SecretList, w io.Writer) error {
|
||||
|
||||
func printNode(node *api.Node, w io.Writer) error {
|
||||
conditionMap := make(map[api.NodeConditionType]*api.NodeCondition)
|
||||
NodeAllConditions := []api.NodeConditionType{api.NodeSchedulable, api.NodeReady}
|
||||
NodeAllConditions := []api.NodeConditionType{api.NodeReady}
|
||||
for i := range node.Status.Conditions {
|
||||
cond := node.Status.Conditions[i]
|
||||
conditionMap[cond.Type] = &cond
|
||||
}
|
||||
var schedulable string
|
||||
if node.Spec.Unschedulable {
|
||||
schedulable = "Unschedulable"
|
||||
} else {
|
||||
schedulable = "Schedulable"
|
||||
}
|
||||
var status []string
|
||||
for _, validCondition := range NodeAllConditions {
|
||||
if condition, ok := conditionMap[validCondition]; ok {
|
||||
@@ -500,7 +506,7 @@ func printNode(node *api.Node, w io.Writer) error {
|
||||
if len(status) == 0 {
|
||||
status = append(status, "Unknown")
|
||||
}
|
||||
_, err := fmt.Fprintf(w, "%s\t%s\t%s\n", node.Name, formatLabels(node.Labels), strings.Join(status, ","))
|
||||
_, err := fmt.Fprintf(w, "%s\t%s\t%s\t%s\n", node.Name, schedulable, formatLabels(node.Labels), strings.Join(status, ","))
|
||||
return err
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user