Headless Services: Adding option to specify None for PortalIP

This commit is contained in:
Abhishek Gupta
2015-03-16 14:36:30 -07:00
parent 7f02e110f4
commit b0c23c1046
16 changed files with 237 additions and 16 deletions

View File

@@ -581,6 +581,12 @@ const (
AffinityTypeNone AffinityType = "None"
)
const (
// PortalIPNone - do not assign a portal IP
// no proxying required and no environment variables should be created for pods
PortalIPNone = "None"
)
// ServiceList holds a list of services.
type ServiceList struct {
TypeMeta `json:",inline"`
@@ -620,7 +626,9 @@ type Service struct {
// PortalIP is usually assigned by the master. If specified by the user
// we will try to respect it or else fail the request. This field can
// not be changed by updates.
PortalIP string `json:"portalIP,omitempty" description:"IP address of the service; usually assigned by the system; if specified, it will be allocated to the service if unused, and creation of the service will fail otherwise; cannot be updated"`
// Valid values are None, empty string (""), or a valid IP address
// None can be specified for headless services when proxying is not required
PortalIP string `json:"portalIP,omitempty" description:"IP address of the service; usually assigned by the system; if specified, it will be allocated to the service if unused, and creation of the service will fail otherwise; cannot be updated; 'None' can be specified for a headless service when proxying is not required"`
// DEPRECATED: has no implementation.
ProxyPort int `json:"proxyPort,omitempty" description:"if non-zero, a pre-allocated host port used for this service by the proxy on each node; assigned by the master and ignored on input"`