Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Chu Peng 楚鹏
minikube
提交
9f09f02e
M
minikube
项目概览
Chu Peng 楚鹏
/
minikube
与 Fork 源项目一致
从无法访问的项目Fork
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
M
minikube
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
9f09f02e
编写于
2月 07, 2019
作者:
T
Thomas Stromberg
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Address PR comments, make sure PullImages code path is exercised
上级
27aafce1
变更
6
显示空白变更内容
内联
并排
Showing
6 changed file
with
21 addition
and
7 deletion
+21
-7
cmd/minikube/cmd/start.go
cmd/minikube/cmd/start.go
+4
-1
pkg/drivers/none/none.go
pkg/drivers/none/none.go
+4
-4
pkg/minikube/cruntime/containerd.go
pkg/minikube/cruntime/containerd.go
+1
-1
pkg/minikube/cruntime/cri.go
pkg/minikube/cruntime/cri.go
+9
-1
pkg/minikube/cruntime/crio.go
pkg/minikube/cruntime/crio.go
+2
-0
pkg/minikube/cruntime/docker.go
pkg/minikube/cruntime/docker.go
+1
-0
未找到文件。
cmd/minikube/cmd/start.go
浏览文件 @
9f09f02e
...
...
@@ -350,7 +350,10 @@ This can also be done automatically by setting the env var CHANGE_MINIKUBE_NONE_
}
if
!
exists
||
config
.
VMDriver
==
constants
.
DriverNone
{
fmt
.
Println
(
"Starting cluster components..."
)
fmt
.
Println
(
"Pulling images..."
)
if
err
:=
bs
.
PullImages
(
kubernetesConfig
);
err
!=
nil
{
fmt
.
Printf
(
"Unable to pull images, which may be OK: %v"
,
err
)
}
if
err
:=
bs
.
StartCluster
(
kubernetesConfig
);
err
!=
nil
{
glog
.
Errorf
(
"Error starting cluster: %v"
,
err
)
cmdutil
.
MaybeReportErrorAndExit
(
err
)
...
...
pkg/drivers/none/none.go
浏览文件 @
9f09f02e
...
...
@@ -122,7 +122,7 @@ func (d *Driver) GetURL() (string, error) {
// GetState returns the state that the host is in (running, stopped, etc)
func
(
d
*
Driver
)
GetState
()
(
state
.
State
,
error
)
{
if
err
:=
running
Kubelet
(
d
.
exec
);
err
!=
nil
{
if
err
:=
check
Kubelet
(
d
.
exec
);
err
!=
nil
{
glog
.
Infof
(
"kubelet not running: %v"
,
err
)
return
state
.
Stopped
,
nil
}
...
...
@@ -153,7 +153,7 @@ func (d *Driver) Remove() error {
if
err
:=
d
.
Kill
();
err
!=
nil
{
return
errors
.
Wrap
(
err
,
"kill"
)
}
// TODO(
tstromberg
): Make sure this calls into the bootstrapper to perform `kubeadm reset`
// TODO(
#3637
): Make sure this calls into the bootstrapper to perform `kubeadm reset`
cmd
:=
fmt
.
Sprintf
(
"sudo rm -rf %s"
,
strings
.
Join
(
cleanupPaths
,
" "
))
if
err
:=
d
.
exec
.
Run
(
cmd
);
err
!=
nil
{
glog
.
Errorf
(
"cleanup incomplete: %v"
,
err
)
...
...
@@ -212,8 +212,8 @@ func restartKubelet(exec bootstrapper.CommandRunner) error {
return
exec
.
Run
(
"sudo systemctl restart kubelet.service"
)
}
//
running
Kubelet returns an error if the kubelet is not running.
func
running
Kubelet
(
exec
bootstrapper
.
CommandRunner
)
error
{
//
check
Kubelet returns an error if the kubelet is not running.
func
check
Kubelet
(
exec
bootstrapper
.
CommandRunner
)
error
{
glog
.
Infof
(
"checking for running kubelet ..."
)
return
exec
.
Run
(
"systemctl is-active --quiet service kubelet"
)
}
pkg/minikube/cruntime/containerd.go
浏览文件 @
9f09f02e
...
...
@@ -74,7 +74,7 @@ func (r *Containerd) Disable() error {
// LoadImage loads an image into this runtime
func
(
r
*
Containerd
)
LoadImage
(
path
string
)
error
{
return
nil
return
pullImageCRI
(
r
.
Runner
,
path
)
}
// KubeletOptions returns kubelet options for a containerd
...
...
pkg/minikube/cruntime/cri.go
浏览文件 @
9f09f02e
...
...
@@ -21,6 +21,8 @@ import (
"fmt"
"html/template"
"path"
"github.com/golang/glog"
)
// listCRIContainers returns a list of containers using crictl
...
...
@@ -29,12 +31,18 @@ func listCRIContainers(_ CommandRunner, _ string) ([]string, error) {
return
[]
string
{},
fmt
.
Errorf
(
"unimplemented"
)
}
// pullImageCRI uses ctr to pull images into a CRI runtime
func
pullImageCRI
(
cr
CommandRunner
,
path
string
)
error
{
glog
.
Infof
(
"Loading image: %s"
,
path
)
return
cr
.
Run
(
fmt
.
Sprintf
(
"sudo ctr cri load %s"
,
path
))
}
// criCRIContainers kills a list of containers using crictl
func
killCRIContainers
(
CommandRunner
,
[]
string
)
error
{
return
fmt
.
Errorf
(
"unimplemented"
)
}
//
S
topCRIContainers stops containers using crictl
//
s
topCRIContainers stops containers using crictl
func
stopCRIContainers
(
CommandRunner
,
[]
string
)
error
{
return
fmt
.
Errorf
(
"unimplemented"
)
}
...
...
pkg/minikube/cruntime/crio.go
浏览文件 @
9f09f02e
...
...
@@ -73,7 +73,9 @@ func (r *CRIO) Disable() error {
// LoadImage loads an image into this runtime
func
(
r
*
CRIO
)
LoadImage
(
path
string
)
error
{
// This should use ctr via pullImageCRI once we sort out why api.v1.CRIPluginService is unimplemented.
return
r
.
Runner
.
Run
(
fmt
.
Sprintf
(
"sudo podman load -i %s"
,
path
))
}
// KubeletOptions returns kubelet options for a runtime.
...
...
pkg/minikube/cruntime/docker.go
浏览文件 @
9f09f02e
...
...
@@ -67,6 +67,7 @@ func (r *Docker) Disable() error {
// LoadImage loads an image into this runtime
func
(
r
*
Docker
)
LoadImage
(
path
string
)
error
{
glog
.
Infof
(
"Loading image: %s"
,
path
)
return
r
.
Runner
.
Run
(
fmt
.
Sprintf
(
"docker load -i %s"
,
path
))
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录