WIP: Persistent disks proposal

This is a draft proposal for expanding GCEPersistentDisk to a fuller PersistentDisk framework.
It should be performed before the volume goes into the pool to be bound.  Administrators can script or build out that solution as necessary.


> On Dec 19, 2014, at 8:05 AM, Mark Turansky <notifications@github.com> wrote:
> 
> In docs/design/persistentdisks.md:
> 
> > +Add a new daemon to master that watches for changes to PersistentDisk in etcd.
> > +
> > +New disk requests are posted to  the API server and are stored in etcd with "pending" status.  The DiskController sees the
> > +change and creates the disk using the cloud provider under which Kubernetes is running (i.e, AWS and GCE). Each provider knows how to make disks for its infrastructure.
> > +  
> > +After creation, the disk phase goes from "pending" to "created".
> > +
> > +## Formatting Options
> > +
> > +Disks created in GCE and AWS require formatting before being mounted as a filesystem on the host.
> > + 
> > +`NodePersistentDisk` would either require creating a partion and formatting it with the filesystem of choice or only allow the filesystem that is currently on the host.
> > + 
> > +> XFS is a filesystem that supports project quotas with regards to size and disk usage.  Without a quota in place, any pod can fill the entire filesystem via an EmptyDir or NodePersistentDisk.
> > +
> > +Formatting must happen on the host.  Kubelet attaches a disk and mounts it.  If the disk is not formatted, Kubelet will perform this task in between attaching and mounting.  
> Who performs the formatting and where?
> 
> The per-node controller talked about in #3043 (and others) might be the appropriate actor.
> 
> —
> Reply to this email directly or view it on GitHub.
>