Additional plugin/pkg/scheduler golint fixes

This commit is contained in:
Christoph Blecker 2017-03-07 18:32:45 -08:00
parent 6a6ee160e8
commit ca24afe778
No known key found for this signature in database
GPG Key ID: B34A59A9D39F838B
4 changed files with 14 additions and 7 deletions

View File

@ -287,6 +287,8 @@ plugin/pkg/auth/authenticator/token/bootstrap
plugin/pkg/auth/authorizer plugin/pkg/auth/authorizer
plugin/pkg/auth/authorizer/rbac/bootstrappolicy plugin/pkg/auth/authorizer/rbac/bootstrappolicy
plugin/pkg/scheduler plugin/pkg/scheduler
plugin/pkg/scheduler/algorithmprovider
plugin/pkg/scheduler/algorithmprovider/defaults
plugin/pkg/scheduler/api/validation plugin/pkg/scheduler/api/validation
staging/src/k8s.io/apimachinery/pkg/api/equality staging/src/k8s.io/apimachinery/pkg/api/equality
staging/src/k8s.io/apimachinery/pkg/api/errors staging/src/k8s.io/apimachinery/pkg/api/errors

View File

@ -41,7 +41,7 @@ type PriorityMapFunction func(pod *v1.Pod, meta interface{}, nodeInfo *scheduler
// TODO: Change interface{} to a specific type. // TODO: Change interface{} to a specific type.
type PriorityReduceFunction func(pod *v1.Pod, meta interface{}, nodeNameToInfo map[string]*schedulercache.NodeInfo, result schedulerapi.HostPriorityList) error type PriorityReduceFunction func(pod *v1.Pod, meta interface{}, nodeNameToInfo map[string]*schedulercache.NodeInfo, result schedulerapi.HostPriorityList) error
// MetdataProducer is a function that computes metadata for a given pod. // MetadataProducer is a function that computes metadata for a given pod.
type MetadataProducer func(pod *v1.Pod, nodeNameToInfo map[string]*schedulercache.NodeInfo) interface{} type MetadataProducer func(pod *v1.Pod, nodeNameToInfo map[string]*schedulercache.NodeInfo) interface{}
// DEPRECATED // DEPRECATED

View File

@ -14,7 +14,6 @@ See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
*/ */
// This is the default algorithm provider for the scheduler.
package defaults package defaults
import ( import (
@ -35,13 +34,19 @@ import (
) )
const ( const (
// DefaultMaxGCEPDVolumes defines the maximum number of PD Volumes for GCE
// GCE instances can have up to 16 PD volumes attached. // GCE instances can have up to 16 PD volumes attached.
DefaultMaxGCEPDVolumes = 16 DefaultMaxGCEPDVolumes = 16
// Larger Azure VMs can actually have much more disks attached. TODO We should determine the max based on VM size // DefaultMaxAzureDiskVolumes defines the maximum number of PD Volumes for Azure
// Larger Azure VMs can actually have much more disks attached.
// TODO We should determine the max based on VM size
DefaultMaxAzureDiskVolumes = 16 DefaultMaxAzureDiskVolumes = 16
ClusterAutoscalerProvider = "ClusterAutoscalerProvider" // ClusterAutoscalerProvider defines the default autoscaler provider
StatefulSetKind = "StatefulSet" ClusterAutoscalerProvider = "ClusterAutoscalerProvider"
KubeMaxPDVols = "KUBE_MAX_PD_VOLS" // StatefulSetKind defines the name of 'StatefulSet' kind
StatefulSetKind = "StatefulSet"
// KubeMaxPDVols defines the maximum number of PD Volumes per kubelet
KubeMaxPDVols = "KUBE_MAX_PD_VOLS"
) )
func init() { func init() {

View File

@ -14,9 +14,9 @@ See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
*/ */
// This package is used to register algorithm provider plugins.
package algorithmprovider package algorithmprovider
import ( import (
// Import defaults of algorithmprovider for initialization.
_ "k8s.io/kubernetes/plugin/pkg/scheduler/algorithmprovider/defaults" _ "k8s.io/kubernetes/plugin/pkg/scheduler/algorithmprovider/defaults"
) )