We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 9a0ec0f + f0320e6 commit 735b607Copy full SHA for 735b607
pkg/client/options.go
@@ -514,7 +514,8 @@ type MatchingLabels map[string]string
514
func (m MatchingLabels) ApplyToList(opts *ListOptions) {
515
// TODO(directxman12): can we avoid reserializing this over and over?
516
if opts.LabelSelector == nil {
517
- opts.LabelSelector = labels.NewSelector()
+ opts.LabelSelector = labels.SelectorFromValidatedSet(map[string]string(m))
518
+ return
519
}
520
// If there's already a selector, we need to AND the two together.
521
noValidSel := labels.SelectorFromValidatedSet(map[string]string(m))
0 commit comments