提交 068a076b 编写于 作者: H Hiroshi Nomura

Fixed join of cert file path in kubeconfig

上级 c1c4455c
...@@ -18,6 +18,7 @@ package bootstrapper ...@@ -18,6 +18,7 @@ package bootstrapper
import ( import (
"net" "net"
"path"
"path/filepath" "path/filepath"
"strings" "strings"
...@@ -44,7 +45,7 @@ var ( ...@@ -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 { ...@@ -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,
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册