WIP: Persistent disks proposal

This is a draft proposal for expanding GCEPersistentDisk to a fuller PersistentDisk framework.
Provider knowing about all types of volumes is too limiting.  Someone should be able to surface volumes to their organization without rewriting the core storage provider.  Core Kube needs to be decoupled from the mechanics of how volumes are created and defined.


> On Dec 19, 2014, at 9:51 AM, Mark Turansky <notifications@github.com> wrote:
> 
> In docs/design/persistentdisks.md:
> 
> > +## Disk performance attributes -- Requesting a disk 
> > +
> > +Pod authors can request storage by its characteristics, specifically size, performance, and filesystem.  Kubernetes maps the request to the underlying cloud provider and chooses the best match.
> > +
> > +> Example: Alice requests 1gb of space for a WordPress installation expected to have low traffic.  She requests "1gb, ext4, 100 IOPS".   Kubernetes is running in AWS and matches this request to an EBS Magnetic Volume (max oops 40-200).  K8s uses the AWS API to create the disk, attach it to the host, format the filesystem, mount the volume, and then deploys Alice's pod.
> > +
> > +> Example:  Ralph requests 10gb of high performance disk space for a MySQL database.  He requests "10gb, xfs, 10000 IOPS".  Cabernets is running in GCE and matches this request to a 
> > +SSD Persistent Disk (read/write 10k/15k IOPS, respectively).  K8s uses the GCE API to create Ralph's disk, just as it did in Alice's example above.
> > +
> > +    
> > +## DiskController
> > +
> > +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.
> There are already many types of disks implicit in the design because, as you suggested, the developer requests storage via attributes (size, speed, etc). The provider maps those requested attributes to an appropriate disk type.
> 
> The provider can have many types of disks (GCE has 2, AWS has 3, our Foo provider for an enterprise customer has X types).
> 
> —
> Reply to this email directly or view it on GitHub.
>