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
9607edc5
Commit
9607edc5
authored
Feb 07, 2017
by
Guangya Liu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Clean up for some typo.
1) Removed a space in portforward.go. 2) Renamed `lockAquisitionFunc` to `lockAcquisitionFunc` in controller.go. 3) Fixed typo in predicates.go.
parent
3f6dd889
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
9 deletions
+9
-9
portforward.go
pkg/kubectl/cmd/portforward.go
+1
-1
controller.go
plugin/pkg/admission/resourcequota/controller.go
+7
-7
predicates.go
plugin/pkg/scheduler/algorithm/predicates/predicates.go
+1
-1
No files found.
pkg/kubectl/cmd/portforward.go
View file @
9607edc5
...
@@ -60,7 +60,7 @@ var (
...
@@ -60,7 +60,7 @@ var (
kubectl port-forward mypod :5000
kubectl port-forward mypod :5000
# Listen on a random port locally, forwarding to 5000 in the pod
# Listen on a random port locally, forwarding to 5000 in the pod
kubectl port-forward
mypod 0:5000`
)
kubectl port-forward mypod 0:5000`
)
)
)
func
NewCmdPortForward
(
f
cmdutil
.
Factory
,
cmdOut
,
cmdErr
io
.
Writer
)
*
cobra
.
Command
{
func
NewCmdPortForward
(
f
cmdutil
.
Factory
,
cmdOut
,
cmdErr
io
.
Writer
)
*
cobra
.
Command
{
...
...
plugin/pkg/admission/resourcequota/controller.go
View file @
9607edc5
...
@@ -45,8 +45,8 @@ type Evaluator interface {
...
@@ -45,8 +45,8 @@ type Evaluator interface {
type
quotaEvaluator
struct
{
type
quotaEvaluator
struct
{
quotaAccessor
QuotaAccessor
quotaAccessor
QuotaAccessor
// lockAquisitionFunc acquires any required locks and returns a cleanup method to defer
// lockA
c
quisitionFunc acquires any required locks and returns a cleanup method to defer
lockAquisitionFunc
func
([]
api
.
ResourceQuota
)
func
()
lockA
c
quisitionFunc
func
([]
api
.
ResourceQuota
)
func
()
// registry that knows how to measure usage for objects
// registry that knows how to measure usage for objects
registry
quota
.
Registry
registry
quota
.
Registry
...
@@ -99,10 +99,10 @@ func newAdmissionWaiter(a admission.Attributes) *admissionWaiter {
...
@@ -99,10 +99,10 @@ func newAdmissionWaiter(a admission.Attributes) *admissionWaiter {
// NewQuotaEvaluator configures an admission controller that can enforce quota constraints
// NewQuotaEvaluator configures an admission controller that can enforce quota constraints
// using the provided registry. The registry must have the capability to handle group/kinds that
// using the provided registry. The registry must have the capability to handle group/kinds that
// are persisted by the server this admission controller is intercepting
// are persisted by the server this admission controller is intercepting
func
NewQuotaEvaluator
(
quotaAccessor
QuotaAccessor
,
registry
quota
.
Registry
,
lockAquisitionFunc
func
([]
api
.
ResourceQuota
)
func
(),
workers
int
,
stopCh
<-
chan
struct
{})
Evaluator
{
func
NewQuotaEvaluator
(
quotaAccessor
QuotaAccessor
,
registry
quota
.
Registry
,
lockA
c
quisitionFunc
func
([]
api
.
ResourceQuota
)
func
(),
workers
int
,
stopCh
<-
chan
struct
{})
Evaluator
{
return
&
quotaEvaluator
{
return
&
quotaEvaluator
{
quotaAccessor
:
quotaAccessor
,
quotaAccessor
:
quotaAccessor
,
lockA
quisitionFunc
:
lockA
quisitionFunc
,
lockA
cquisitionFunc
:
lockAc
quisitionFunc
,
registry
:
registry
,
registry
:
registry
,
...
@@ -173,8 +173,8 @@ func (e *quotaEvaluator) checkAttributes(ns string, admissionAttributes []*admis
...
@@ -173,8 +173,8 @@ func (e *quotaEvaluator) checkAttributes(ns string, admissionAttributes []*admis
return
return
}
}
if
e
.
lockAquisitionFunc
!=
nil
{
if
e
.
lockA
c
quisitionFunc
!=
nil
{
releaseLocks
:=
e
.
lockAquisitionFunc
(
quotas
)
releaseLocks
:=
e
.
lockA
c
quisitionFunc
(
quotas
)
defer
releaseLocks
()
defer
releaseLocks
()
}
}
...
...
plugin/pkg/scheduler/algorithm/predicates/predicates.go
View file @
9607edc5
...
@@ -692,7 +692,7 @@ type ServiceAffinity struct {
...
@@ -692,7 +692,7 @@ type ServiceAffinity struct {
// only should be referenced by NewServiceAffinityPredicate.
// only should be referenced by NewServiceAffinityPredicate.
func
(
s
*
ServiceAffinity
)
serviceAffinityPrecomputation
(
pm
*
predicateMetadata
)
{
func
(
s
*
ServiceAffinity
)
serviceAffinityPrecomputation
(
pm
*
predicateMetadata
)
{
if
pm
.
pod
==
nil
{
if
pm
.
pod
==
nil
{
glog
.
Errorf
(
"Cannot precompute service affinity, a pod is required to cal
u
culate service affinity."
)
glog
.
Errorf
(
"Cannot precompute service affinity, a pod is required to calculate service affinity."
)
return
return
}
}
...
...
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