Commit ed7002ac authored by Darren Shepherd's avatar Darren Shepherd

Allow override of "kubernetes" endpoint port

parent d31a1f06
...@@ -206,6 +206,8 @@ type SecureServingInfo struct { ...@@ -206,6 +206,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 {
...@@ -474,6 +476,9 @@ func (s *SecureServingInfo) HostPort() (string, int, error) { ...@@ -474,6 +476,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
} }
......
...@@ -65,6 +65,8 @@ type SecureServingOptions struct { ...@@ -65,6 +65,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 {
...@@ -252,6 +254,8 @@ func (s *SecureServingOptions) ApplyTo(config **server.SecureServingInfo) error ...@@ -252,6 +254,8 @@ func (s *SecureServingOptions) ApplyTo(config **server.SecureServingInfo) error
return err return err
} }
c.AdvertisePort = s.AdvertisePort
return nil return nil
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment