Fix: remove unnecessary case in field selector (#5367)
Signed-off-by: wuzhongjian <wuzhongjian_yewu@cmss.chinamobile.com> Signed-off-by: wuzhongjian <wuzhongjian_yewu@cmss.chinamobile.com>
This commit is contained in:
@@ -100,10 +100,11 @@ func contains(secret *v1.Secret, queryValue query.Value) bool {
|
||||
for _, requirement := range fieldSelector.Requirements() {
|
||||
var negative bool
|
||||
// supports '=', '==' and '!='.(e.g. ?fieldSelector=key1=value1,key2=value2)
|
||||
// fields.ParseSelector(FieldSelector) has handled the case where the operator is '==' and converted it to '=',
|
||||
// so case selection.DoubleEquals can be ignored here.
|
||||
switch requirement.Operator {
|
||||
case selection.NotEquals:
|
||||
negative = true
|
||||
case selection.DoubleEquals:
|
||||
case selection.Equals:
|
||||
negative = false
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user