Merge branch 'master' into auto_consistency_fix

This commit is contained in:
Tadeusz Magura-Witkowski 2020-04-02 10:49:10 +02:00 committed by GitHub
commit 0513ce3d6b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -415,6 +415,9 @@ func inClusterConfig() (cluster k8sapi.Cluster, user k8sapi.AuthInfo, namespace
err = fmt.Errorf("unable to load in-cluster configuration, KUBERNETES_SERVICE_HOST and KUBERNETES_SERVICE_PORT must be defined") err = fmt.Errorf("unable to load in-cluster configuration, KUBERNETES_SERVICE_HOST and KUBERNETES_SERVICE_PORT must be defined")
return return
} }
// we need to wrap IPv6 addresses in square brackets
// IPv4 also works with square brackets
host = "[" + host + "]"
cluster = k8sapi.Cluster{ cluster = k8sapi.Cluster{
Server: "https://" + host + ":" + port, Server: "https://" + host + ":" + port,
CertificateAuthority: "/var/run/secrets/kubernetes.io/serviceaccount/ca.crt", CertificateAuthority: "/var/run/secrets/kubernetes.io/serviceaccount/ca.crt",