add SessionAffinity type to ServiceSpec

This PR is the first step for enhancing the load balancer in the service proxy to support sticky sessions - Issue #2867.  This type will be used in enabled through the service config json/yaml.  
Nil pointer is better because json defaulting rules are cleaner.  Omitted
field becomes nil, not empty string.

Brendan
On Dec 29, 2014 2:23 PM, "Tim Hockin" <notifications@github.com> wrote:

> In pkg/api/types.go
> <https://github.com/GoogleCloudPlatform/kubernetes/pull/2875#discussion-diff-22331739>
> :
>
> > @@ -606,6 +617,9 @@ type ServiceSpec struct {
> >  	// ContainerPort is the name of the port on the container to direct traffic to.
> >  	// Optional, if unspecified use the first port on the container.
> >  	ContainerPort util.IntOrString `json:"containerPort,omitempty"`
> > +
> > +	// Optional: Supports "ClientIP" and "None".  Used to maintain session affinity.
> > +	SessionAffinity *AffinityType `json:"sessionAffinity,omitempty"`
>
> Why is this a pointer? How is a nil pointer different from "None"?
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/GoogleCloudPlatform/kubernetes/pull/2875/files#r22331739>
> .
>