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
b6557bab
Commit
b6557bab
authored
Apr 16, 2016
by
Hai Huang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
minor comment and code fixes
parent
b5b190df
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
evaluator.go
pkg/quota/generic/evaluator.go
+3
-2
No files found.
pkg/quota/generic/evaluator.go
View file @
b6557bab
...
...
@@ -48,8 +48,8 @@ func MatchesNoScopeFunc(scope api.ResourceQuotaScope, object runtime.Object) boo
return
false
}
// ObjectCountConstraintsFunc returns
true if the specified resource name is in
// the required set of resource names
// ObjectCountConstraintsFunc returns
ConstraintsFunc that returns nil if the
//
specified resource name is in
the required set of resource names
func
ObjectCountConstraintsFunc
(
resourceName
api
.
ResourceName
)
ConstraintsFunc
{
return
func
(
required
[]
api
.
ResourceName
,
item
runtime
.
Object
)
error
{
if
!
quota
.
Contains
(
required
,
resourceName
)
{
...
...
@@ -133,6 +133,7 @@ func (g *GenericEvaluator) Matches(resourceQuota *api.ResourceQuota, item runtim
for
resourceName
:=
range
resourceQuota
.
Status
.
Hard
{
if
g
.
MatchesResource
(
resourceName
)
{
matchResource
=
true
break
}
}
// by default, no scopes matches all
...
...
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