mirror of https://github.com/k3s-io/k3s
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.pull/6/head
parent
3f6dd889f3
commit
9607edc556
|
@ -60,7 +60,7 @@ var (
|
|||
kubectl port-forward mypod :5000
|
||||
|
||||
# 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 {
|
||||
|
|
|
@ -45,8 +45,8 @@ type Evaluator interface {
|
|||
|
||||
type quotaEvaluator struct {
|
||||
quotaAccessor QuotaAccessor
|
||||
// lockAquisitionFunc acquires any required locks and returns a cleanup method to defer
|
||||
lockAquisitionFunc func([]api.ResourceQuota) func()
|
||||
// lockAcquisitionFunc acquires any required locks and returns a cleanup method to defer
|
||||
lockAcquisitionFunc func([]api.ResourceQuota) func()
|
||||
|
||||
// registry that knows how to measure usage for objects
|
||||
registry quota.Registry
|
||||
|
@ -99,10 +99,10 @@ func newAdmissionWaiter(a admission.Attributes) *admissionWaiter {
|
|||
// 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
|
||||
// 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, lockAcquisitionFunc func([]api.ResourceQuota) func(), workers int, stopCh <-chan struct{}) Evaluator {
|
||||
return "aEvaluator{
|
||||
quotaAccessor: quotaAccessor,
|
||||
lockAquisitionFunc: lockAquisitionFunc,
|
||||
quotaAccessor: quotaAccessor,
|
||||
lockAcquisitionFunc: lockAcquisitionFunc,
|
||||
|
||||
registry: registry,
|
||||
|
||||
|
@ -173,8 +173,8 @@ func (e *quotaEvaluator) checkAttributes(ns string, admissionAttributes []*admis
|
|||
return
|
||||
}
|
||||
|
||||
if e.lockAquisitionFunc != nil {
|
||||
releaseLocks := e.lockAquisitionFunc(quotas)
|
||||
if e.lockAcquisitionFunc != nil {
|
||||
releaseLocks := e.lockAcquisitionFunc(quotas)
|
||||
defer releaseLocks()
|
||||
}
|
||||
|
||||
|
|
|
@ -692,7 +692,7 @@ type ServiceAffinity struct {
|
|||
// only should be referenced by NewServiceAffinityPredicate.
|
||||
func (s *ServiceAffinity) serviceAffinityPrecomputation(pm *predicateMetadata) {
|
||||
if pm.pod == nil {
|
||||
glog.Errorf("Cannot precompute service affinity, a pod is required to caluculate service affinity.")
|
||||
glog.Errorf("Cannot precompute service affinity, a pod is required to calculate service affinity.")
|
||||
return
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue