func (n *Node) IsReady() bool {
	if n.Spec.Unschedulable || len(n.Status.Conditions) == 0 {
		return false
	}
	conditionMap := make(map[corev1.NodeConditionType]*corev1.NodeCondition)
	conditions := []corev1.NodeConditionType{corev1.NodeReady}
	for i := range n.Status.Conditions {
		cond := n.Status.Conditions[i]
		conditionMap[cond.Type] = &cond
	}
	for _, validCondition := range conditions {
		if condition, ok := conditionMap[validCondition]; ok {
			if condition.Status == corev1.ConditionFalse {
				return false
			}
		}
	}
	return true
}
IsReady checks whether the node is ready to accept pods
package kubernetes
import (
	"fmt"
	corev1 "k8s.io/api/core/v1"
	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
	"k8s.io/client-go/kubernetes"
)
const flagName = "dice"
var flagValue = "roll"
type Node struct {
	*corev1.Node
}
func (n *Node) IsFlagged() bool {
	return n.Labels[flagName] == flagValue
}