mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-03 01:06:27 +00:00
Merge pull request #29611 from ping035627/ping035627-patch-0726
Automatic merge from submit-queue add DefaultServiceNodePortRange const The PR add DefaultServiceNodePortRange const in server_run_options.go, and use it in genericapiserver.go and server_run_options.go.
This commit is contained in:
commit
15946ddd76
@ -285,8 +285,7 @@ func setDefaults(c *Config) {
|
|||||||
// We should probably allow this for clouds that don't require NodePort to do load-balancing (GCE)
|
// We should probably allow this for clouds that don't require NodePort to do load-balancing (GCE)
|
||||||
// but then that breaks the strict nestedness of ServiceType.
|
// but then that breaks the strict nestedness of ServiceType.
|
||||||
// Review post-v1
|
// Review post-v1
|
||||||
defaultServiceNodePortRange := utilnet.PortRange{Base: 30000, Size: 2768}
|
c.ServiceNodePortRange = options.DefaultServiceNodePortRange
|
||||||
c.ServiceNodePortRange = defaultServiceNodePortRange
|
|
||||||
glog.Infof("Node port range unspecified. Defaulting to %v.", c.ServiceNodePortRange)
|
glog.Infof("Node port range unspecified. Defaulting to %v.", c.ServiceNodePortRange)
|
||||||
}
|
}
|
||||||
if c.MasterCount == 0 {
|
if c.MasterCount == 0 {
|
||||||
|
@ -46,6 +46,8 @@ const (
|
|||||||
defaultLongRunningRequestRE = "(/|^)((watch|proxy)(/|$)|(logs?|portforward|exec|attach)/?$)"
|
defaultLongRunningRequestRE = "(/|^)((watch|proxy)(/|$)|(logs?|portforward|exec|attach)/?$)"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
var DefaultServiceNodePortRange = utilnet.PortRange{Base: 30000, Size: 2768}
|
||||||
|
|
||||||
// ServerRunOptions contains the options while running a generic api server.
|
// ServerRunOptions contains the options while running a generic api server.
|
||||||
type ServerRunOptions struct {
|
type ServerRunOptions struct {
|
||||||
APIGroupPrefix string
|
APIGroupPrefix string
|
||||||
@ -133,7 +135,7 @@ func NewServerRunOptions() *ServerRunOptions {
|
|||||||
MinRequestTimeout: 1800,
|
MinRequestTimeout: 1800,
|
||||||
RuntimeConfig: make(config.ConfigurationMap),
|
RuntimeConfig: make(config.ConfigurationMap),
|
||||||
SecurePort: 6443,
|
SecurePort: 6443,
|
||||||
ServiceNodePortRange: utilnet.PortRange{Base: 30000, Size: 2768},
|
ServiceNodePortRange: DefaultServiceNodePortRange,
|
||||||
StorageVersions: registered.AllPreferredGroupVersions(),
|
StorageVersions: registered.AllPreferredGroupVersions(),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user