Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Chu Peng 楚鹏
minikube
提交
9830d91c
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,发现更多精彩内容 >>
提交
9830d91c
编写于
2月 11, 2020
作者:
S
Sharif Elgamal
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
linting nonsense
上级
adc1a569
变更
7
显示空白变更内容
内联
并排
Showing
7 changed file
with
22 addition
and
14 deletion
+22
-14
cmd/minikube/cmd/node_delete.go
cmd/minikube/cmd/node_delete.go
+10
-2
cmd/minikube/cmd/node_start.go
cmd/minikube/cmd/node_start.go
+4
-1
cmd/minikube/cmd/node_stop.go
cmd/minikube/cmd/node_stop.go
+4
-1
cmd/minikube/cmd/start.go
cmd/minikube/cmd/start.go
+0
-5
pkg/minikube/cluster/cluster_test.go
pkg/minikube/cluster/cluster_test.go
+2
-2
pkg/minikube/cluster/fix.go
pkg/minikube/cluster/fix.go
+2
-2
pkg/minikube/node/node.go
pkg/minikube/node/node.go
+0
-1
未找到文件。
cmd/minikube/cmd/node_delete.go
浏览文件 @
9830d91c
...
@@ -17,6 +17,7 @@ limitations under the License.
...
@@ -17,6 +17,7 @@ limitations under the License.
package
cmd
package
cmd
import
(
import
(
"github.com/golang/glog"
"github.com/spf13/cobra"
"github.com/spf13/cobra"
"github.com/spf13/viper"
"github.com/spf13/viper"
"k8s.io/minikube/pkg/minikube/cluster"
"k8s.io/minikube/pkg/minikube/cluster"
...
@@ -24,6 +25,7 @@ import (
...
@@ -24,6 +25,7 @@ import (
"k8s.io/minikube/pkg/minikube/exit"
"k8s.io/minikube/pkg/minikube/exit"
"k8s.io/minikube/pkg/minikube/machine"
"k8s.io/minikube/pkg/minikube/machine"
"k8s.io/minikube/pkg/minikube/node"
"k8s.io/minikube/pkg/minikube/node"
"k8s.io/minikube/pkg/minikube/out"
)
)
var
nodeDeleteCmd
=
&
cobra
.
Command
{
var
nodeDeleteCmd
=
&
cobra
.
Command
{
...
@@ -53,10 +55,16 @@ var nodeDeleteCmd = &cobra.Command{
...
@@ -53,10 +55,16 @@ var nodeDeleteCmd = &cobra.Command{
}
}
if
cluster
.
IsHostRunning
(
api
,
name
)
{
if
cluster
.
IsHostRunning
(
api
,
name
)
{
node
.
Stop
(
cc
,
n
)
err
:=
node
.
Stop
(
cc
,
n
)
if
err
!=
nil
{
glog
.
Warningf
(
"Failed to stop node, will still try to delete"
)
}
}
}
node
.
Delete
(
cc
,
name
)
err
=
node
.
Delete
(
cc
,
name
)
if
err
!=
nil
{
out
.
FatalT
(
"Failed to delete node {{.name}}"
,
out
.
V
{
"name"
:
name
})
}
},
},
}
}
...
...
cmd/minikube/cmd/node_start.go
浏览文件 @
9830d91c
...
@@ -61,7 +61,10 @@ var nodeStartCmd = &cobra.Command{
...
@@ -61,7 +61,10 @@ var nodeStartCmd = &cobra.Command{
}
}
// Start it up baby
// Start it up baby
node
.
Start
(
cc
,
n
,
false
,
nil
)
_
,
err
=
node
.
Start
(
cc
,
n
,
false
,
nil
)
if
err
!=
nil
{
out
.
FatalT
(
"Failed to start node {{.name}}"
,
out
.
V
{
"name"
:
name
})
}
},
},
}
}
...
...
cmd/minikube/cmd/node_stop.go
浏览文件 @
9830d91c
...
@@ -59,7 +59,10 @@ var nodeStopCmd = &cobra.Command{
...
@@ -59,7 +59,10 @@ var nodeStopCmd = &cobra.Command{
exit
.
WithError
(
"retrieving node"
,
err
)
exit
.
WithError
(
"retrieving node"
,
err
)
}
}
node
.
Stop
(
cc
,
n
)
err
=
node
.
Stop
(
cc
,
n
)
if
err
!=
nil
{
out
.
FatalT
(
"Failed to stop node {{.name}}"
,
out
.
V
{
"name"
:
name
})
}
},
},
}
}
...
...
cmd/minikube/cmd/start.go
浏览文件 @
9830d91c
...
@@ -942,8 +942,3 @@ func getKubernetesVersion(old *config.MachineConfig) string {
...
@@ -942,8 +942,3 @@ func getKubernetesVersion(old *config.MachineConfig) string {
}
}
return
nv
return
nv
}
}
// saveConfig saves profile cluster configuration in $MINIKUBE_HOME/profiles/<profilename>/config.json
func
saveConfig
(
clusterCfg
*
config
.
MachineConfig
)
error
{
return
config
.
SaveProfile
(
viper
.
GetString
(
config
.
MachineProfile
),
clusterCfg
)
}
pkg/minikube/cluster/cluster_test.go
浏览文件 @
9830d91c
pkg/minikube/cluster/fix.go
浏览文件 @
9830d91c
...
@@ -198,8 +198,8 @@ func adjustGuestClock(h hostRunner, t time.Time) error {
...
@@ -198,8 +198,8 @@ func adjustGuestClock(h hostRunner, t time.Time) error {
// machineExists checks if virtual machine does not exist
// machineExists checks if virtual machine does not exist
// if the virtual machine exists, return true
// if the virtual machine exists, return true
func
machineExists
(
Driver
string
,
s
state
.
State
,
err
error
)
(
bool
,
error
)
{
func
machineExists
(
d
string
,
s
state
.
State
,
err
error
)
(
bool
,
error
)
{
switch
Driver
{
switch
d
{
case
driver
.
HyperKit
:
case
driver
.
HyperKit
:
if
s
==
state
.
Stopped
||
err
.
Error
()
==
"connection is shut down"
{
if
s
==
state
.
Stopped
||
err
.
Error
()
==
"connection is shut down"
{
return
false
,
ErrorMachineNotExist
return
false
,
ErrorMachineNotExist
...
...
pkg/minikube/node/node.go
浏览文件 @
9830d91c
...
@@ -26,7 +26,6 @@ import (
...
@@ -26,7 +26,6 @@ import (
const
(
const
(
imageRepository
=
"image-repository"
imageRepository
=
"image-repository"
force
=
"force"
cacheImages
=
"cache-images"
cacheImages
=
"cache-images"
waitUntilHealthy
=
"wait"
waitUntilHealthy
=
"wait"
cacheImageConfigKey
=
"cache"
cacheImageConfigKey
=
"cache"
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录