mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-09 05:01:46 +00:00
Headless Services: Adding option to specify None for PortalIP
This commit is contained in:
@@ -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"`
|
||||
|
Reference in New Issue
Block a user