Additional service ports config for master service.

This commit is contained in:
Andrew Butcher
2015-10-07 11:06:05 -04:00
parent eeeb5e0cd6
commit efd8e3c9c7
4 changed files with 214 additions and 75 deletions

View File

@@ -246,6 +246,18 @@ type Config struct {
// Used to start and monitor tunneling
Tunneler Tunneler
// Additional ports to be exposed on the master service
// extraServicePorts is injectable in the event that more ports
// (other than the default 443/tcp) are exposed on the master
// and those ports need to be load balanced by the master
// service because this pkg is linked by out-of-tree projects
// like openshift which want to use the master but also do
// more stuff.
ExtraServicePorts []api.ServicePort
// Additional ports to be exposed on the master endpoints
// Port names should align with ports defined in ExtraServicePorts
ExtraEndpointPorts []api.EndpointPort
KubernetesServiceNodePort int
}
@@ -288,6 +300,8 @@ type Master struct {
serviceReadWriteIP net.IP
serviceReadWritePort int
masterServices *util.Runner
extraServicePorts []api.ServicePort
extraEndpointPorts []api.EndpointPort
// storage contains the RESTful endpoints exposed by this master
storage map[string]rest.Storage
@@ -450,6 +464,8 @@ func New(c *Config) *Master {
serviceReadWriteIP: c.ServiceReadWriteIP,
// TODO: serviceReadWritePort should be passed in as an argument, it may not always be 443
serviceReadWritePort: 443,
extraServicePorts: c.ExtraServicePorts,
extraEndpointPorts: c.ExtraEndpointPorts,
tunneler: c.Tunneler,
@@ -757,6 +773,8 @@ func (m *Master) NewBootstrapController() *Controller {
ServiceIP: m.serviceReadWriteIP,
ServicePort: m.serviceReadWritePort,
ExtraServicePorts: m.extraServicePorts,
ExtraEndpointPorts: m.extraEndpointPorts,
PublicServicePort: m.publicReadWritePort,
KubernetesServiceNodePort: m.KubernetesServiceNodePort,
}