Attach/Detach Controller Kubelet Changes

This PR contains Kubelet changes to enable attach/detach controller control.
* It introduces a new "enable-controller-attach-detach" kubelet flag to
  enable control by controller. Default enabled.
* It removes all references "SafeToDetach" annoation from controller.
* It adds the new VolumesInUse field to the Node Status API object.
* It modifies the controller to use VolumesInUse instead of SafeToDetach
  annotation to gate detachment.
* There is a bug in node-problem-detector that causes VolumesInUse to
  get reset every 30 seconds. Issue https://github.com/kubernetes/node-problem-detector/issues/9
  opened to fix that.
This commit is contained in:
Saad Ali
2016-05-23 13:37:30 -07:00
committed by saadali
parent 24ddec1cbf
commit 9dbe943491
35 changed files with 2346 additions and 1217 deletions

View File

@@ -134,13 +134,6 @@ type AttachableVolumePlugin interface {
NewAttacher() (Attacher, error)
NewDetacher() (Detacher, error)
// GetUniqueVolumeName returns a unique name representing the volume
// defined in spec. e.g. pluginname-deviceName-readwrite
// This helps ensures that the same operation (attach/detach) is never
// started on the same volume.
// If the plugin does not support the given spec, this returns an error.
GetUniqueVolumeName(spec *Spec) (string, error)
// GetDeviceName returns the name or ID of the device referenced in the
// specified volume spec. This is passed by callers to the Deatch method.
// If the plugin does not support the given spec, this returns an error.