mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-11-08 19:03:42 +00:00
chore: clarify the labels in scheduler-perf
This commit is contained in:
@@ -16,15 +16,13 @@ limitations under the License.
|
||||
|
||||
package benchmark
|
||||
|
||||
import "strings"
|
||||
|
||||
// enabled checks a a label filter that works as in GitHub:
|
||||
// - empty string means enabled
|
||||
// - individual labels are comma-separated
|
||||
// - [+]<label> means the workload must have that label
|
||||
// - -<label> means the workload must not have that label
|
||||
func enabled(labelFilter string, labels ...string) bool {
|
||||
for _, label := range strings.Split(labelFilter, ",") {
|
||||
func enabled(labelFilters []string, labels ...string) bool {
|
||||
for _, label := range labelFilters {
|
||||
if label == "" {
|
||||
continue
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user