Commit e94e50c9 authored by Xing Yang's avatar Xing Yang

Fix function and type names in the comments

This patch fixes function and type names in the comments in predicates.go.
parent 07449649
...@@ -44,7 +44,7 @@ import ( ...@@ -44,7 +44,7 @@ import (
"k8s.io/metrics/pkg/client/clientset_generated/clientset" "k8s.io/metrics/pkg/client/clientset_generated/clientset"
) )
// predicatePrecomputations: Helper types/variables... // PredicateMetadataModifier: Helper types/variables...
type PredicateMetadataModifier func(pm *predicateMetadata) type PredicateMetadataModifier func(pm *predicateMetadata)
var predicatePrecomputeRegisterLock sync.Mutex var predicatePrecomputeRegisterLock sync.Mutex
...@@ -56,7 +56,7 @@ func RegisterPredicatePrecomputation(predicateName string, precomp PredicateMeta ...@@ -56,7 +56,7 @@ func RegisterPredicatePrecomputation(predicateName string, precomp PredicateMeta
predicatePrecomputations[predicateName] = precomp predicatePrecomputations[predicateName] = precomp
} }
// Other types for predicate functions... // NodeInfo: Other types for predicate functions...
type NodeInfo interface { type NodeInfo interface {
GetNodeInfo(nodeID string) (*v1.Node, error) GetNodeInfo(nodeID string) (*v1.Node, error)
} }
...@@ -377,7 +377,7 @@ type VolumeZoneChecker struct { ...@@ -377,7 +377,7 @@ type VolumeZoneChecker struct {
pvcInfo PersistentVolumeClaimInfo pvcInfo PersistentVolumeClaimInfo
} }
// VolumeZonePredicate evaluates if a pod can fit due to the volumes it requests, given // NewVolumeZonePredicate evaluates if a pod can fit due to the volumes it requests, given
// that some volumes may have zone scheduling constraints. The requirement is that any // that some volumes may have zone scheduling constraints. The requirement is that any
// volume zone-labels must match the equivalent zone-labels on the node. It is OK for // volume zone-labels must match the equivalent zone-labels on the node. It is OK for
// the node to have more zone-label constraints (for example, a hypothetical replicated // the node to have more zone-label constraints (for example, a hypothetical replicated
...@@ -474,10 +474,10 @@ func (c *VolumeZoneChecker) predicate(pod *v1.Pod, meta interface{}, nodeInfo *s ...@@ -474,10 +474,10 @@ func (c *VolumeZoneChecker) predicate(pod *v1.Pod, meta interface{}, nodeInfo *s
return true, nil, nil return true, nil, nil
} }
// Returns a *schedulercache.Resource that covers the largest width in each // GetResourceRequest returns a *schedulercache.Resource that covers the largest
// resource dimension. Because init-containers run sequentially, we collect the // width in each resource dimension. Because init-containers run sequentially, we collect
// max in each dimension iteratively. In contrast, we sum the resource vectors // the max in each dimension iteratively. In contrast, we sum the resource vectors for
// for regular containers since they run simultaneously. // regular containers since they run simultaneously.
// //
// Example: // Example:
// //
...@@ -1307,7 +1307,7 @@ type VolumeNodeChecker struct { ...@@ -1307,7 +1307,7 @@ type VolumeNodeChecker struct {
client clientset.Interface client clientset.Interface
} }
// VolumeNodeChecker evaluates if a pod can fit due to the volumes it requests, given // NewVolumeNodePredicate evaluates if a pod can fit due to the volumes it requests, given
// that some volumes have node topology constraints, particularly when using Local PVs. // that some volumes have node topology constraints, particularly when using Local PVs.
// The requirement is that any pod that uses a PVC that is bound to a PV with topology constraints // The requirement is that any pod that uses a PVC that is bound to a PV with topology constraints
// must be scheduled to a node that satisfies the PV's topology labels. // must be scheduled to a node that satisfies the PV's topology labels.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment