Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
eba0d125
Commit
eba0d125
authored
Jul 26, 2016
by
PingWang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add DefaultServiceNodePortRange const
Signed-off-by:
PingWang
<
wang.ping5@zte.com.cn
>
update DefaultServiceNodePortRange define Signed-off-by:
PingWang
<
wang.ping5@zte.com.cn
>
parent
ed3a29bd
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
3 deletions
+4
-3
genericapiserver.go
pkg/genericapiserver/genericapiserver.go
+1
-2
server_run_options.go
pkg/genericapiserver/options/server_run_options.go
+3
-1
No files found.
pkg/genericapiserver/genericapiserver.go
View file @
eba0d125
...
...
@@ -283,8 +283,7 @@ func setDefaults(c *Config) {
// 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.
// Review post-v1
defaultServiceNodePortRange
:=
utilnet
.
PortRange
{
Base
:
30000
,
Size
:
2768
}
c
.
ServiceNodePortRange
=
defaultServiceNodePortRange
c
.
ServiceNodePortRange
=
options
.
DefaultServiceNodePortRange
glog
.
Infof
(
"Node port range unspecified. Defaulting to %v."
,
c
.
ServiceNodePortRange
)
}
if
c
.
MasterCount
==
0
{
...
...
pkg/genericapiserver/options/server_run_options.go
View file @
eba0d125
...
...
@@ -46,6 +46,8 @@ const (
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.
type
ServerRunOptions
struct
{
APIGroupPrefix
string
...
...
@@ -133,7 +135,7 @@ func NewServerRunOptions() *ServerRunOptions {
MinRequestTimeout
:
1800
,
RuntimeConfig
:
make
(
config
.
ConfigurationMap
),
SecurePort
:
6443
,
ServiceNodePortRange
:
utilnet
.
PortRange
{
Base
:
30000
,
Size
:
2768
}
,
ServiceNodePortRange
:
DefaultServiceNodePortRange
,
StorageVersions
:
registered
.
AllPreferredGroupVersions
(),
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment