WIP: Persistent disks proposal

This is a draft proposal for expanding GCEPersistentDisk to a fuller PersistentDisk framework.
Basically, it is a requirement that operators be able to expose multiple storage types as volumes - ceph plus nfs plus cinder plus gluster will all exist in customer environments.  So any implementation assuming one implementation fails that model.

Adding a new volume type may require changes to kubelets, but that's already known and understood.


> On Dec 19, 2014, at 8:02 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.
> 2 is an impossible number. Currently, there is one provider of infrastructure (the cloud providing the disks). Do we intend for there to be many types of infrastructure for storage in the same environment? Can't mix the cloud providers, of course, but do we need to support having NFS shares and a GCEPersistentDisk in the same cluster? I cannot imagine a good use case for this.
> 
> —
> Reply to this email directly or view it on GitHub.
>