Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
c83f18a8
Commit
c83f18a8
authored
Jul 18, 2018
by
vikaschoudhary16
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix 'Exists' scope selector operator
parent
990b3d70
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
1 deletion
+4
-1
resource_quota_controller_test.go
...ontroller/resourcequota/resource_quota_controller_test.go
+0
-0
pods.go
pkg/quota/evaluator/core/pods.go
+4
-1
No files found.
pkg/controller/resourcequota/resource_quota_controller_test.go
View file @
c83f18a8
This diff is collapsed.
Click to expand it.
pkg/quota/evaluator/core/pods.go
View file @
c83f18a8
...
@@ -380,7 +380,10 @@ func podMatchesSelector(pod *api.Pod, selector api.ScopedResourceSelectorRequire
...
@@ -380,7 +380,10 @@ func podMatchesSelector(pod *api.Pod, selector api.ScopedResourceSelectorRequire
if
err
!=
nil
{
if
err
!=
nil
{
return
false
,
fmt
.
Errorf
(
"failed to parse and convert selector: %v"
,
err
)
return
false
,
fmt
.
Errorf
(
"failed to parse and convert selector: %v"
,
err
)
}
}
m
:=
map
[
string
]
string
{
string
(
api
.
ResourceQuotaScopePriorityClass
)
:
pod
.
Spec
.
PriorityClassName
}
var
m
map
[
string
]
string
if
len
(
pod
.
Spec
.
PriorityClassName
)
!=
0
{
m
=
map
[
string
]
string
{
string
(
api
.
ResourceQuotaScopePriorityClass
)
:
pod
.
Spec
.
PriorityClassName
}
}
if
labelSelector
.
Matches
(
labels
.
Set
(
m
))
{
if
labelSelector
.
Matches
(
labels
.
Set
(
m
))
{
return
true
,
nil
return
true
,
nil
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment