Fixed join of cert file path in kubeconfig
parent
c1c4455c0f
commit
068a076b98
|
@ -18,6 +18,7 @@ package bootstrapper
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"net"
|
"net"
|
||||||
|
"path"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
|
@ -44,7 +45,7 @@ var (
|
||||||
// SetupCerts gets the generated credentials required to talk to the APIServer.
|
// SetupCerts gets the generated credentials required to talk to the APIServer.
|
||||||
func SetupCerts(cmd CommandRunner, k8s KubernetesConfig) error {
|
func SetupCerts(cmd CommandRunner, k8s KubernetesConfig) error {
|
||||||
localPath := constants.GetMinipath()
|
localPath := constants.GetMinipath()
|
||||||
glog.Infoln("Setting up certificates for IP: %s", k8s.NodeIP)
|
glog.Infof("Setting up certificates for IP: %s\n", k8s.NodeIP)
|
||||||
|
|
||||||
if err := generateCerts(k8s); err != nil {
|
if err := generateCerts(k8s); err != nil {
|
||||||
return errors.Wrap(err, "Error generating certs")
|
return errors.Wrap(err, "Error generating certs")
|
||||||
|
@ -68,9 +69,9 @@ func SetupCerts(cmd CommandRunner, k8s KubernetesConfig) error {
|
||||||
kubeCfgSetup := &kubeconfig.KubeConfigSetup{
|
kubeCfgSetup := &kubeconfig.KubeConfigSetup{
|
||||||
ClusterName: k8s.NodeName,
|
ClusterName: k8s.NodeName,
|
||||||
ClusterServerAddress: "https://localhost:8443",
|
ClusterServerAddress: "https://localhost:8443",
|
||||||
ClientCertificate: filepath.Join(util.DefaultCertPath, "apiserver.crt"),
|
ClientCertificate: path.Join(util.DefaultCertPath, "apiserver.crt"),
|
||||||
ClientKey: filepath.Join(util.DefaultCertPath, "apiserver.key"),
|
ClientKey: path.Join(util.DefaultCertPath, "apiserver.key"),
|
||||||
CertificateAuthority: filepath.Join(util.DefaultCertPath, "ca.crt"),
|
CertificateAuthority: path.Join(util.DefaultCertPath, "ca.crt"),
|
||||||
KeepContext: false,
|
KeepContext: false,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue