Remove ConditionSchedulable

This commit is contained in:
gmarek
2015-04-03 15:43:51 +02:00
parent d6851729d2
commit ef56dca6b6
11 changed files with 34 additions and 130 deletions

View File

@@ -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
}