func MatchTopologySelectorTerms(topologySelectorTerms []v1.TopologySelectorTerm, lbls labels.Set) bool {
	if len(topologySelectorTerms) == 0 {
		// empty term list matches all objects
		return true
	}

	for _, req := range topologySelectorTerms {
		// nil or empty term selects no objects
		if len(req.MatchLabelExpressions) == 0 {
			continue
		}

		labelSelector, err := TopologySelectorRequirementsAsSelector(req.MatchLabelExpressions)
		if err != nil || !labelSelector.Matches(lbls) {
			continue
		}

		return true
	}

	return false
}
// MatchTopologySelectorTerms checks whether given labels match topology selector terms in ORed;
// nil or empty term matches no objects; while empty term list matches all objects.
MatchTopologySelectorTerms checks whether given labels match topology selector terms in ORed;
nil or empty term matches no objects; while empty term list matches all objects.
// MatchTopologySelectorTerms checks whether given labels match topology selector terms in ORed ; // nil or empty term matches no objects ; while empty term list matches all objects .
func MatchTopologySelectorTerms(topologySelectorTerms []v1.TopologySelectorTerm, lbls labels.Set) bool {
	if len(topologySelectorTerms) == 0 {
		return true
	}
	for _, req := range topologySelectorTerms {
		if len(req.MatchLabelExpressions) == 0 {
			continue
		}
		labelSelector, err := TopologySelectorRequirementsAsSelector(req.MatchLabelExpressions)
		if err != nil || !labelSelector.Matches(lbls) {
			continue
		}
		return true
	}
	return false
}
func MatchTopologySelectorTerms ( topologySelectorTerms [ ] v1 . TopologySelectorTerm , lbls labels . Set ) bool { if len ( topologySelectorTerms ) == 0 { return true } for _ , req := range topologySelectorTerms { if len ( req . MatchLabelExpressions ) == 0 { continue } labelSelector , err := TopologySelectorRequirementsAsSelector ( req . MatchLabelExpressions ) if err != nil || ! labelSelector . Matches ( lbls ) { continue } return true } return false }
MatchTopologySelectorTerms checks whether given labels match topology selector terms in ORed;
nil or empty term matches no objects; while empty term list matches all objects.
MatchTopologySelectorTerms checks whether given labels match topology selector terms in ORed ; nil or empty term matches no objects ; while empty term list matches all objects .
// empty term list matches all objects // nil or empty term selects no objects