remove ro service
This commit is contained in:
@@ -119,9 +119,6 @@ type Config struct {
|
||||
// same value for this field. (Numbers > 1 currently untested.)
|
||||
MasterCount int
|
||||
|
||||
// The port on PublicAddress where a read-only server will be installed.
|
||||
// Defaults to 7080 if not set.
|
||||
ReadOnlyPort int
|
||||
// The port on PublicAddress where a read-write server will be installed.
|
||||
// Defaults to 6443 if not set.
|
||||
ReadWritePort int
|
||||
@@ -178,10 +175,7 @@ type Master struct {
|
||||
externalHost string
|
||||
// clusterIP is the IP address of the master within the cluster.
|
||||
clusterIP net.IP
|
||||
publicReadOnlyPort int
|
||||
publicReadWritePort int
|
||||
serviceReadOnlyIP net.IP
|
||||
serviceReadOnlyPort int
|
||||
serviceReadWriteIP net.IP
|
||||
serviceReadWritePort int
|
||||
masterServices *util.Runner
|
||||
@@ -244,9 +238,6 @@ func setDefaults(c *Config) {
|
||||
// Clearly, there will be at least one master.
|
||||
c.MasterCount = 1
|
||||
}
|
||||
if c.ReadOnlyPort == 0 {
|
||||
c.ReadOnlyPort = 7080
|
||||
}
|
||||
if c.ReadWritePort == 0 {
|
||||
c.ReadWritePort = 6443
|
||||
}
|
||||
@@ -276,7 +267,6 @@ func setDefaults(c *Config) {
|
||||
// ServiceClusterIPRange
|
||||
// ServiceNodePortRange
|
||||
// MasterCount
|
||||
// ReadOnlyPort
|
||||
// ReadWritePort
|
||||
// PublicAddress
|
||||
// Certain config fields must be specified, including:
|
||||
@@ -301,16 +291,12 @@ func New(c *Config) *Master {
|
||||
glog.Fatalf("master.New() called with config.KubeletClient == nil")
|
||||
}
|
||||
|
||||
// Select the first two valid IPs from serviceClusterIPRange to use as the master service IPs
|
||||
serviceReadOnlyIP, err := ipallocator.GetIndexedIP(c.ServiceClusterIPRange, 1)
|
||||
if err != nil {
|
||||
glog.Fatalf("Failed to generate service read-only IP for master service: %v", err)
|
||||
}
|
||||
serviceReadWriteIP, err := ipallocator.GetIndexedIP(c.ServiceClusterIPRange, 2)
|
||||
// Select the first valid IP from serviceClusterIPRange to use as the master service IP.
|
||||
serviceReadWriteIP, err := ipallocator.GetIndexedIP(c.ServiceClusterIPRange, 1)
|
||||
if err != nil {
|
||||
glog.Fatalf("Failed to generate service read-write IP for master service: %v", err)
|
||||
}
|
||||
glog.V(4).Infof("Setting master service IPs based to %q (read-only) and %q (read-write).", serviceReadOnlyIP, serviceReadWriteIP)
|
||||
glog.V(4).Infof("Setting master service IP to %q (read-write).", serviceReadWriteIP)
|
||||
|
||||
m := &Master{
|
||||
serviceClusterIPRange: c.ServiceClusterIPRange,
|
||||
@@ -335,11 +321,7 @@ func New(c *Config) *Master {
|
||||
masterCount: c.MasterCount,
|
||||
externalHost: c.ExternalHost,
|
||||
clusterIP: c.PublicAddress,
|
||||
publicReadOnlyPort: c.ReadOnlyPort,
|
||||
publicReadWritePort: c.ReadWritePort,
|
||||
serviceReadOnlyIP: serviceReadOnlyIP,
|
||||
// TODO: serviceReadOnlyPort should be passed in as an argument, it may not always be 80
|
||||
serviceReadOnlyPort: 80,
|
||||
serviceReadWriteIP: serviceReadWriteIP,
|
||||
// TODO: serviceReadWritePort should be passed in as an argument, it may not always be 443
|
||||
serviceReadWritePort: 443,
|
||||
@@ -360,6 +342,7 @@ func New(c *Config) *Master {
|
||||
m.muxHelper = &apiserver.MuxHelper{m.mux, []string{}}
|
||||
|
||||
m.init(c)
|
||||
|
||||
return m
|
||||
}
|
||||
|
||||
@@ -618,10 +601,6 @@ func (m *Master) NewBootstrapController() *Controller {
|
||||
ServiceIP: m.serviceReadWriteIP,
|
||||
ServicePort: m.serviceReadWritePort,
|
||||
PublicServicePort: m.publicReadWritePort,
|
||||
|
||||
ReadOnlyServiceIP: m.serviceReadOnlyIP,
|
||||
ReadOnlyServicePort: m.serviceReadOnlyPort,
|
||||
PublicReadOnlyServicePort: m.publicReadOnlyPort,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -639,10 +618,6 @@ func (m *Master) InstallSwaggerAPI() {
|
||||
host := m.clusterIP.String()
|
||||
if m.publicReadWritePort != 0 {
|
||||
hostAndPort = net.JoinHostPort(host, strconv.Itoa(m.publicReadWritePort))
|
||||
} else {
|
||||
// Use the read only port.
|
||||
hostAndPort = net.JoinHostPort(host, strconv.Itoa(m.publicReadOnlyPort))
|
||||
protocol = "http://"
|
||||
}
|
||||
}
|
||||
webServicesUrl := protocol + hostAndPort
|
||||
|
Reference in New Issue
Block a user