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
0b80546d
Commit
0b80546d
authored
Oct 08, 2018
by
Darren Shepherd
Committed by
Erik Wilson
Jul 13, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Allow override of "kubernetes" endpoint port
parent
0d9710cd
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
0 deletions
+11
-0
config.go
staging/src/k8s.io/apiserver/pkg/server/config.go
+5
-0
serving.go
staging/src/k8s.io/apiserver/pkg/server/options/serving.go
+6
-0
No files found.
staging/src/k8s.io/apiserver/pkg/server/config.go
View file @
0b80546d
...
@@ -217,6 +217,8 @@ type SecureServingInfo struct {
...
@@ -217,6 +217,8 @@ type SecureServingInfo struct {
// HTTP2MaxStreamsPerConnection is the limit that the api server imposes on each client.
// HTTP2MaxStreamsPerConnection is the limit that the api server imposes on each client.
// A value of zero means to use the default provided by golang's HTTP/2 support.
// A value of zero means to use the default provided by golang's HTTP/2 support.
HTTP2MaxStreamsPerConnection
int
HTTP2MaxStreamsPerConnection
int
AdvertisePort
int
}
}
type
AuthenticationInfo
struct
{
type
AuthenticationInfo
struct
{
...
@@ -537,6 +539,9 @@ func (s *SecureServingInfo) HostPort() (string, int, error) {
...
@@ -537,6 +539,9 @@ func (s *SecureServingInfo) HostPort() (string, int, error) {
if
err
!=
nil
{
if
err
!=
nil
{
return
""
,
0
,
fmt
.
Errorf
(
"invalid non-numeric port %q"
,
portStr
)
return
""
,
0
,
fmt
.
Errorf
(
"invalid non-numeric port %q"
,
portStr
)
}
}
if
s
.
AdvertisePort
!=
0
{
port
=
s
.
AdvertisePort
}
return
host
,
port
,
nil
return
host
,
port
,
nil
}
}
...
...
staging/src/k8s.io/apiserver/pkg/server/options/serving.go
View file @
0b80546d
...
@@ -66,6 +66,8 @@ type SecureServingOptions struct {
...
@@ -66,6 +66,8 @@ type SecureServingOptions struct {
// HTTP2MaxStreamsPerConnection is the limit that the api server imposes on each client.
// HTTP2MaxStreamsPerConnection is the limit that the api server imposes on each client.
// A value of zero means to use the default provided by golang's HTTP/2 support.
// A value of zero means to use the default provided by golang's HTTP/2 support.
HTTP2MaxStreamsPerConnection
int
HTTP2MaxStreamsPerConnection
int
AdvertisePort
int
}
}
type
CertKey
struct
{
type
CertKey
struct
{
...
@@ -153,6 +155,8 @@ func (s *SecureServingOptions) AddFlags(fs *pflag.FlagSet) {
...
@@ -153,6 +155,8 @@ func (s *SecureServingOptions) AddFlags(fs *pflag.FlagSet) {
}
}
fs
.
IntVar
(
&
s
.
BindPort
,
"secure-port"
,
s
.
BindPort
,
desc
)
fs
.
IntVar
(
&
s
.
BindPort
,
"secure-port"
,
s
.
BindPort
,
desc
)
fs
.
IntVar
(
&
s
.
AdvertisePort
,
"advertise-port"
,
s
.
AdvertisePort
,
"The port that will be advertised as kubernetes endpoints"
)
fs
.
StringVar
(
&
s
.
ServerCert
.
CertDirectory
,
"cert-dir"
,
s
.
ServerCert
.
CertDirectory
,
""
+
fs
.
StringVar
(
&
s
.
ServerCert
.
CertDirectory
,
"cert-dir"
,
s
.
ServerCert
.
CertDirectory
,
""
+
"The directory where the TLS certs are located. "
+
"The directory where the TLS certs are located. "
+
"If --tls-cert-file and --tls-private-key-file are provided, this flag will be ignored."
)
"If --tls-cert-file and --tls-private-key-file are provided, this flag will be ignored."
)
...
@@ -265,6 +269,8 @@ func (s *SecureServingOptions) ApplyTo(config **server.SecureServingInfo) error
...
@@ -265,6 +269,8 @@ func (s *SecureServingOptions) ApplyTo(config **server.SecureServingInfo) error
return
err
return
err
}
}
c
.
AdvertisePort
=
s
.
AdvertisePort
return
nil
return
nil
}
}
...
...
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