Don't require the kubeconfigs and certs to not exist; that's now handled in later in the individual phase code. Also fix a small test

pull/6/head
Lucas Käldström 2017-01-21 01:00:17 +02:00
parent 13499f443a
commit 9e7ef10f95
No known key found for this signature in database
GPG Key ID: 3FA3783D77751514
2 changed files with 1 additions and 3 deletions

View File

@ -74,6 +74,7 @@ func TestNewCertAndKey(t *testing.T) {
config := certutil.Config{ config := certutil.Config{
CommonName: "test", CommonName: "test",
Organization: []string{"test"}, Organization: []string{"test"},
Usages: []x509.ExtKeyUsage{x509.ExtKeyUsageClientAuth},
} }
_, _, actual := NewCertAndKey(caCert, caKey, config) _, _, actual := NewCertAndKey(caCert, caKey, config)
if (actual == nil) != rt.expected { if (actual == nil) != rt.expected {

View File

@ -319,10 +319,7 @@ func RunInitMasterChecks(cfg *kubeadmapi.MasterConfiguration) error {
PortOpenCheck{port: 10252}, PortOpenCheck{port: 10252},
HTTPProxyCheck{Proto: "https", Host: cfg.API.AdvertiseAddresses[0], Port: int(cfg.API.Port)}, HTTPProxyCheck{Proto: "https", Host: cfg.API.AdvertiseAddresses[0], Port: int(cfg.API.Port)},
DirAvailableCheck{Path: path.Join(kubeadmapi.GlobalEnvParams.KubernetesDir, "manifests")}, DirAvailableCheck{Path: path.Join(kubeadmapi.GlobalEnvParams.KubernetesDir, "manifests")},
DirAvailableCheck{Path: kubeadmapi.GlobalEnvParams.HostPKIPath},
DirAvailableCheck{Path: "/var/lib/kubelet"}, DirAvailableCheck{Path: "/var/lib/kubelet"},
FileAvailableCheck{Path: path.Join(kubeadmapi.GlobalEnvParams.KubernetesDir, kubeconfig.AdminKubeConfigFileName)},
FileAvailableCheck{Path: path.Join(kubeadmapi.GlobalEnvParams.KubernetesDir, kubeconfig.KubeletKubeConfigFileName)},
FileContentCheck{Path: bridgenf, Content: []byte{'1'}}, FileContentCheck{Path: bridgenf, Content: []byte{'1'}},
InPathCheck{executable: "ip", mandatory: true}, InPathCheck{executable: "ip", mandatory: true},
InPathCheck{executable: "iptables", mandatory: true}, InPathCheck{executable: "iptables", mandatory: true},