mirror of https://github.com/k3s-io/k3s
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
commit
74aaa14390
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"swaggerVersion": "1.2",
|
"swaggerVersion": "1.2",
|
||||||
"apiVersion": "",
|
"apiVersion": "",
|
||||||
"basePath": "https://10.10.10.10:443",
|
"basePath": "https://10.10.10.10:6443",
|
||||||
"resourcePath": "/api",
|
"resourcePath": "/api",
|
||||||
"apis": [
|
"apis": [
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"swaggerVersion": "1.2",
|
"swaggerVersion": "1.2",
|
||||||
"apiVersion": "",
|
"apiVersion": "",
|
||||||
"basePath": "https://10.10.10.10:443",
|
"basePath": "https://10.10.10.10:6443",
|
||||||
"resourcePath": "/apis",
|
"resourcePath": "/apis",
|
||||||
"apis": [
|
"apis": [
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"swaggerVersion": "1.2",
|
"swaggerVersion": "1.2",
|
||||||
"apiVersion": "",
|
"apiVersion": "",
|
||||||
"basePath": "https://10.10.10.10:443",
|
"basePath": "https://10.10.10.10:6443",
|
||||||
"resourcePath": "/apis/apps",
|
"resourcePath": "/apis/apps",
|
||||||
"apis": [
|
"apis": [
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"swaggerVersion": "1.2",
|
"swaggerVersion": "1.2",
|
||||||
"apiVersion": "apps/v1alpha1",
|
"apiVersion": "apps/v1alpha1",
|
||||||
"basePath": "https://10.10.10.10:443",
|
"basePath": "https://10.10.10.10:6443",
|
||||||
"resourcePath": "/apis/apps/v1alpha1",
|
"resourcePath": "/apis/apps/v1alpha1",
|
||||||
"apis": [
|
"apis": [
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"swaggerVersion": "1.2",
|
"swaggerVersion": "1.2",
|
||||||
"apiVersion": "",
|
"apiVersion": "",
|
||||||
"basePath": "https://10.10.10.10:443",
|
"basePath": "https://10.10.10.10:6443",
|
||||||
"resourcePath": "/apis/autoscaling",
|
"resourcePath": "/apis/autoscaling",
|
||||||
"apis": [
|
"apis": [
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"swaggerVersion": "1.2",
|
"swaggerVersion": "1.2",
|
||||||
"apiVersion": "autoscaling/v1",
|
"apiVersion": "autoscaling/v1",
|
||||||
"basePath": "https://10.10.10.10:443",
|
"basePath": "https://10.10.10.10:6443",
|
||||||
"resourcePath": "/apis/autoscaling/v1",
|
"resourcePath": "/apis/autoscaling/v1",
|
||||||
"apis": [
|
"apis": [
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"swaggerVersion": "1.2",
|
"swaggerVersion": "1.2",
|
||||||
"apiVersion": "",
|
"apiVersion": "",
|
||||||
"basePath": "https://10.10.10.10:443",
|
"basePath": "https://10.10.10.10:6443",
|
||||||
"resourcePath": "/apis/batch",
|
"resourcePath": "/apis/batch",
|
||||||
"apis": [
|
"apis": [
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"swaggerVersion": "1.2",
|
"swaggerVersion": "1.2",
|
||||||
"apiVersion": "batch/v1",
|
"apiVersion": "batch/v1",
|
||||||
"basePath": "https://10.10.10.10:443",
|
"basePath": "https://10.10.10.10:6443",
|
||||||
"resourcePath": "/apis/batch/v1",
|
"resourcePath": "/apis/batch/v1",
|
||||||
"apis": [
|
"apis": [
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"swaggerVersion": "1.2",
|
"swaggerVersion": "1.2",
|
||||||
"apiVersion": "batch/v2alpha1",
|
"apiVersion": "batch/v2alpha1",
|
||||||
"basePath": "https://10.10.10.10:443",
|
"basePath": "https://10.10.10.10:6443",
|
||||||
"resourcePath": "/apis/batch/v2alpha1",
|
"resourcePath": "/apis/batch/v2alpha1",
|
||||||
"apis": [
|
"apis": [
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"swaggerVersion": "1.2",
|
"swaggerVersion": "1.2",
|
||||||
"apiVersion": "",
|
"apiVersion": "",
|
||||||
"basePath": "https://10.10.10.10:443",
|
"basePath": "https://10.10.10.10:6443",
|
||||||
"resourcePath": "/apis/extensions",
|
"resourcePath": "/apis/extensions",
|
||||||
"apis": [
|
"apis": [
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"swaggerVersion": "1.2",
|
"swaggerVersion": "1.2",
|
||||||
"apiVersion": "extensions/v1beta1",
|
"apiVersion": "extensions/v1beta1",
|
||||||
"basePath": "https://10.10.10.10:443",
|
"basePath": "https://10.10.10.10:6443",
|
||||||
"resourcePath": "/apis/extensions/v1beta1",
|
"resourcePath": "/apis/extensions/v1beta1",
|
||||||
"apis": [
|
"apis": [
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"swaggerVersion": "1.2",
|
"swaggerVersion": "1.2",
|
||||||
"apiVersion": "",
|
"apiVersion": "",
|
||||||
"basePath": "https://10.10.10.10:443",
|
"basePath": "https://10.10.10.10:6443",
|
||||||
"resourcePath": "/apis/policy",
|
"resourcePath": "/apis/policy",
|
||||||
"apis": [
|
"apis": [
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"swaggerVersion": "1.2",
|
"swaggerVersion": "1.2",
|
||||||
"apiVersion": "policy/v1alpha1",
|
"apiVersion": "policy/v1alpha1",
|
||||||
"basePath": "https://10.10.10.10:443",
|
"basePath": "https://10.10.10.10:6443",
|
||||||
"resourcePath": "/apis/policy/v1alpha1",
|
"resourcePath": "/apis/policy/v1alpha1",
|
||||||
"apis": [
|
"apis": [
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"swaggerVersion": "1.2",
|
"swaggerVersion": "1.2",
|
||||||
"apiVersion": "",
|
"apiVersion": "",
|
||||||
"basePath": "https://10.10.10.10:443",
|
"basePath": "https://10.10.10.10:6443",
|
||||||
"resourcePath": "/apis/rbac.authorization.k8s.io",
|
"resourcePath": "/apis/rbac.authorization.k8s.io",
|
||||||
"apis": [
|
"apis": [
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"swaggerVersion": "1.2",
|
"swaggerVersion": "1.2",
|
||||||
"apiVersion": "rbac.authorization.k8s.io/v1alpha1",
|
"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",
|
"resourcePath": "/apis/rbac.authorization.k8s.io/v1alpha1",
|
||||||
"apis": [
|
"apis": [
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"swaggerVersion": "1.2",
|
"swaggerVersion": "1.2",
|
||||||
"apiVersion": "v1",
|
"apiVersion": "v1",
|
||||||
"basePath": "https://10.10.10.10:443",
|
"basePath": "https://10.10.10.10:6443",
|
||||||
"resourcePath": "/api/v1",
|
"resourcePath": "/api/v1",
|
||||||
"apis": [
|
"apis": [
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"swaggerVersion": "1.2",
|
"swaggerVersion": "1.2",
|
||||||
"apiVersion": "",
|
"apiVersion": "",
|
||||||
"basePath": "https://10.10.10.10:443",
|
"basePath": "https://10.10.10.10:6443",
|
||||||
"resourcePath": "/version",
|
"resourcePath": "/version",
|
||||||
"apis": [
|
"apis": [
|
||||||
{
|
{
|
||||||
|
|
|
@ -303,7 +303,7 @@ func setDefaults(c *Config) {
|
||||||
if len(c.ExternalHost) == 0 && c.PublicAddress != nil {
|
if len(c.ExternalHost) == 0 && c.PublicAddress != nil {
|
||||||
hostAndPort := c.PublicAddress.String()
|
hostAndPort := c.PublicAddress.String()
|
||||||
if c.ReadWritePort != 0 {
|
if c.ReadWritePort != 0 {
|
||||||
hostAndPort = net.JoinHostPort(hostAndPort, strconv.Itoa(c.ServiceReadWritePort))
|
hostAndPort = net.JoinHostPort(hostAndPort, strconv.Itoa(c.ReadWritePort))
|
||||||
}
|
}
|
||||||
c.ExternalHost = hostAndPort
|
c.ExternalHost = hostAndPort
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue