Proposal: Separate desired and current states

Speculative change for some items from #1200:

* Metadata that applies to resources is split from APIMetadata on non-resource API objects
* Metadata is a sub field of objects
* Labels are on Metadata
* Pod current and desired state is split
* Name is used for pods instead of ID (UID is part of metadata, Name is part of resource) for idempotent creation #148 and #1216 
* PodTemplate is a Metadata carrying object as per #170
 * If replicationController gave way to a generic "replicator", then pod template could be both a nested struct and a real resource.
* A ScheduledPod and ScheduledPodList is what the kubelet sees as per #860
* Non-schema'd k/v values on Metadata as `Config` (better names welcome) as per #1201

Not changed yet:

* ReplicationControllers
* Services

Only look at the second commit, the first is just to get a nice diff from v1beta1.


----- Original Message -----
> > +	// json/yaml tags.
> > +	// TODO: Make real decisions about what our info should look like.
> > +	Info PodInfo `json:"info,omitempty" yaml:"info,omitempty"`
> > +}
> > +
> > +// PodList is a list of Pods.
> > +type PodList struct {
> > +	Metadata APIMetadata `json:"metadata,omitempty" yaml:"metadata"`
> > +	Items    []Pod       `json:"items" yaml:"items,omitempty"`
> > +}
> > +
> > +func (*PodList) IsAnAPIObject() {}
> > +
> > +// Pod is a collection of containers that can run on a host.
> > +type Pod struct {
> > +	Metadata Metadata `json:"metadata,omitempty" yaml:"metadata,omitempty"`
> 
> Hm, did you decide to not inline any of these? Why?
> 
> ---
> Reply to this email directly or view it on GitHub:
> https://github.com/GoogleCloudPlatform/kubernetes/pull/1225/files#r17316813

Because by not inlining them you can omit them easily from objects (just cleanliness) and it does simplify some POST structures.  I mostly wanted to try it out visually.  It's something I've seen in other API contexts for fields that are special where keeping them from being mixed in with other attributes is desirable.  However, it's not critical to the proposal.