Merge pull request #26796 from nikhiljindal/publicAddress

Automatic merge from submit-queue

Fixing logic to generate ExternalHost in genericapiserver

@ncdc pointed it out (https://kubernetes.slack.com/archives/sig-api-machinery/p1464974528000139) that lines 305 and 306 dont match. We should be using ReadWritePort instead of ServiceReadWritePort in line 306.

https://github.com/kubernetes/kubernetes/pull/20626 seems to be the culprit PR.
pull/6/head
k8s-merge-robot 2016-06-04 10:48:55 -07:00
commit 74aaa14390
18 changed files with 18 additions and 18 deletions

View File

@ -1,7 +1,7 @@
{
"swaggerVersion": "1.2",
"apiVersion": "",
"basePath": "https://10.10.10.10:443",
"basePath": "https://10.10.10.10:6443",
"resourcePath": "/api",
"apis": [
{

View File

@ -1,7 +1,7 @@
{
"swaggerVersion": "1.2",
"apiVersion": "",
"basePath": "https://10.10.10.10:443",
"basePath": "https://10.10.10.10:6443",
"resourcePath": "/apis",
"apis": [
{

View File

@ -1,7 +1,7 @@
{
"swaggerVersion": "1.2",
"apiVersion": "",
"basePath": "https://10.10.10.10:443",
"basePath": "https://10.10.10.10:6443",
"resourcePath": "/apis/apps",
"apis": [
{

View File

@ -1,7 +1,7 @@
{
"swaggerVersion": "1.2",
"apiVersion": "apps/v1alpha1",
"basePath": "https://10.10.10.10:443",
"basePath": "https://10.10.10.10:6443",
"resourcePath": "/apis/apps/v1alpha1",
"apis": [
{

View File

@ -1,7 +1,7 @@
{
"swaggerVersion": "1.2",
"apiVersion": "",
"basePath": "https://10.10.10.10:443",
"basePath": "https://10.10.10.10:6443",
"resourcePath": "/apis/autoscaling",
"apis": [
{

View File

@ -1,7 +1,7 @@
{
"swaggerVersion": "1.2",
"apiVersion": "autoscaling/v1",
"basePath": "https://10.10.10.10:443",
"basePath": "https://10.10.10.10:6443",
"resourcePath": "/apis/autoscaling/v1",
"apis": [
{

View File

@ -1,7 +1,7 @@
{
"swaggerVersion": "1.2",
"apiVersion": "",
"basePath": "https://10.10.10.10:443",
"basePath": "https://10.10.10.10:6443",
"resourcePath": "/apis/batch",
"apis": [
{

View File

@ -1,7 +1,7 @@
{
"swaggerVersion": "1.2",
"apiVersion": "batch/v1",
"basePath": "https://10.10.10.10:443",
"basePath": "https://10.10.10.10:6443",
"resourcePath": "/apis/batch/v1",
"apis": [
{

View File

@ -1,7 +1,7 @@
{
"swaggerVersion": "1.2",
"apiVersion": "batch/v2alpha1",
"basePath": "https://10.10.10.10:443",
"basePath": "https://10.10.10.10:6443",
"resourcePath": "/apis/batch/v2alpha1",
"apis": [
{

View File

@ -1,7 +1,7 @@
{
"swaggerVersion": "1.2",
"apiVersion": "",
"basePath": "https://10.10.10.10:443",
"basePath": "https://10.10.10.10:6443",
"resourcePath": "/apis/extensions",
"apis": [
{

View File

@ -1,7 +1,7 @@
{
"swaggerVersion": "1.2",
"apiVersion": "extensions/v1beta1",
"basePath": "https://10.10.10.10:443",
"basePath": "https://10.10.10.10:6443",
"resourcePath": "/apis/extensions/v1beta1",
"apis": [
{

View File

@ -1,7 +1,7 @@
{
"swaggerVersion": "1.2",
"apiVersion": "",
"basePath": "https://10.10.10.10:443",
"basePath": "https://10.10.10.10:6443",
"resourcePath": "/apis/policy",
"apis": [
{

View File

@ -1,7 +1,7 @@
{
"swaggerVersion": "1.2",
"apiVersion": "policy/v1alpha1",
"basePath": "https://10.10.10.10:443",
"basePath": "https://10.10.10.10:6443",
"resourcePath": "/apis/policy/v1alpha1",
"apis": [
{

View File

@ -1,7 +1,7 @@
{
"swaggerVersion": "1.2",
"apiVersion": "",
"basePath": "https://10.10.10.10:443",
"basePath": "https://10.10.10.10:6443",
"resourcePath": "/apis/rbac.authorization.k8s.io",
"apis": [
{

View File

@ -1,7 +1,7 @@
{
"swaggerVersion": "1.2",
"apiVersion": "rbac.authorization.k8s.io/v1alpha1",
"basePath": "https://10.10.10.10:443",
"basePath": "https://10.10.10.10:6443",
"resourcePath": "/apis/rbac.authorization.k8s.io/v1alpha1",
"apis": [
{

View File

@ -1,7 +1,7 @@
{
"swaggerVersion": "1.2",
"apiVersion": "v1",
"basePath": "https://10.10.10.10:443",
"basePath": "https://10.10.10.10:6443",
"resourcePath": "/api/v1",
"apis": [
{

View File

@ -1,7 +1,7 @@
{
"swaggerVersion": "1.2",
"apiVersion": "",
"basePath": "https://10.10.10.10:443",
"basePath": "https://10.10.10.10:6443",
"resourcePath": "/version",
"apis": [
{

View File

@ -303,7 +303,7 @@ func setDefaults(c *Config) {
if len(c.ExternalHost) == 0 && c.PublicAddress != nil {
hostAndPort := c.PublicAddress.String()
if c.ReadWritePort != 0 {
hostAndPort = net.JoinHostPort(hostAndPort, strconv.Itoa(c.ServiceReadWritePort))
hostAndPort = net.JoinHostPort(hostAndPort, strconv.Itoa(c.ReadWritePort))
}
c.ExternalHost = hostAndPort
}