func ParseConditions(conditions []string) []SuppliedCondition {
	parsed := make([]SuppliedCondition, len(conditions))
	for i, c := range conditions {
		ts := strings.SplitN(c, "=", 2)
		if len(ts) != 2 {
			ts = []string{c, "True,0s"}
		}
		sm := strings.SplitN(ts[1], ",", 2)
		duration, err := time.ParseDuration(sm[1])
		if err == nil {
			parsed[i] = SuppliedCondition{core.NodeConditionType(ts[0]), core.ConditionStatus(sm[0]), duration}
		}
	}
	return parsed
}
ParseConditions can parse the string array of conditions to a list of
SuppliedContion to support particular status value and duration.
package kubernetes
import (
	"fmt"
	"sort"
	"strings"
	"time"
	"go.uber.org/zap"
	core "k8s.io/api/core/v1"
	"k8s.io/apimachinery/pkg/types"
	"github.com/antonmedv/expr"
)
func NewNodeLabelFilter(expressionStr *string, log *zap.Logger) (func(o interface{}) bool, error) {
	expression, err := expr.Compile(*expressionStr)
	if err != nil && *expressionStr != "" {
		return nil, err
	}
	return func(o interface{}) bool {
		if *expressionStr == "" {
			return true
		}
		n, ok := o.(*core.Node)
		if !ok {
			return false
		}
		nodeLabels := n.GetLabels()
		parameters := map[string]interface{}{
			"metadata": map[string]map[string]string{
				"labels": nodeLabels,
			},
		}
		result, err := expr.Run(expression, parameters)
		if err != nil {
			log.Error(fmt.Sprintf("Could not parse expression: %v", err))
		}
		return result.(bool)
	}, nil
}