
For AWS EBS, a volume can only be attached to a node in the same AZ. The scheduler must therefore detect if a volume is being attached to a pod, and ensure that the pod is scheduled on a node in the same AZ as the volume. So that the scheduler need not query the cloud provider every time, and to support decoupled operation (e.g. bare metal) we tag the volume with our placement labels. This is done automatically by means of an admission controller on AWS when a PersistentVolume is created backed by an EBS volume. Support for tagging GCE PVs will follow. Pods that specify a volume directly (i.e. without using a PersistentVolumeClaim) will not currently be scheduled correctly (i.e. they will be scheduled without zone-awareness).
41 lines
1.6 KiB
Go
41 lines
1.6 KiB
Go
/*
|
|
Copyright 2014 The Kubernetes Authors All rights reserved.
|
|
|
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
you may not use this file except in compliance with the License.
|
|
You may obtain a copy of the License at
|
|
|
|
http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
Unless required by applicable law or agreed to in writing, software
|
|
distributed under the License is distributed on an "AS IS" BASIS,
|
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
See the License for the specific language governing permissions and
|
|
limitations under the License.
|
|
*/
|
|
|
|
package app
|
|
|
|
// This file exists to force the desired plugin implementations to be linked.
|
|
// This should probably be part of some configuration fed into the build for a
|
|
// given binary target.
|
|
import (
|
|
// Cloud providers
|
|
_ "k8s.io/kubernetes/pkg/cloudprovider/providers"
|
|
|
|
// Admission policies
|
|
_ "k8s.io/kubernetes/plugin/pkg/admission/admit"
|
|
_ "k8s.io/kubernetes/plugin/pkg/admission/alwayspullimages"
|
|
_ "k8s.io/kubernetes/plugin/pkg/admission/deny"
|
|
_ "k8s.io/kubernetes/plugin/pkg/admission/exec"
|
|
_ "k8s.io/kubernetes/plugin/pkg/admission/initialresources"
|
|
_ "k8s.io/kubernetes/plugin/pkg/admission/limitranger"
|
|
_ "k8s.io/kubernetes/plugin/pkg/admission/namespace/autoprovision"
|
|
_ "k8s.io/kubernetes/plugin/pkg/admission/namespace/exists"
|
|
_ "k8s.io/kubernetes/plugin/pkg/admission/namespace/lifecycle"
|
|
_ "k8s.io/kubernetes/plugin/pkg/admission/persistentvolume/label"
|
|
_ "k8s.io/kubernetes/plugin/pkg/admission/resourcequota"
|
|
_ "k8s.io/kubernetes/plugin/pkg/admission/securitycontext/scdeny"
|
|
_ "k8s.io/kubernetes/plugin/pkg/admission/serviceaccount"
|
|
)
|