Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Chu Peng 楚鹏
minikube
提交
96c39bf0
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,发现更多精彩内容 >>
提交
96c39bf0
编写于
10月 19, 2019
作者:
A
Anders F Björklund
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Pick some lint from the recent master commits
上级
76a8df22
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
20 addition
and
10 deletion
+20
-10
Makefile
Makefile
+3
-1
cmd/minikube/cmd/delete.go
cmd/minikube/cmd/delete.go
+7
-3
cmd/minikube/cmd/start.go
cmd/minikube/cmd/start.go
+1
-0
pkg/minikube/bootstrapper/images/images.go
pkg/minikube/bootstrapper/images/images.go
+3
-1
pkg/minikube/cluster/cluster.go
pkg/minikube/cluster/cluster.go
+2
-2
pkg/minikube/cluster/machine.go
pkg/minikube/cluster/machine.go
+3
-2
pkg/minikube/config/profile.go
pkg/minikube/config/profile.go
+1
-1
未找到文件。
Makefile
浏览文件 @
96c39bf0
...
...
@@ -249,6 +249,8 @@ endif
which go-bindata
||
GO111MODULE
=
off
GOBIN
=
"
$(GOPATH)$(DIRSEP)
bin"
go get github.com/jteeuwen/go-bindata/...
PATH
=
"
$(PATH)$(PATHSEP)$(GOPATH)$(DIRSEP)
bin"
go-bindata
-nomemcopy
-o
$@
-pkg
assets deploy/addons/...
-
gofmt
-s
-w
$@
@
#golint: Dns should be DNS
(
compat
sed
)
@
sed
-i
-e
's/Dns/DNS/g'
$@
&&
rm
-f
./-e
pkg/minikube/translate/translations.go
:
$(shell find "translations/" -type f)
ifeq
($(MINIKUBE_BUILD_IN_DOCKER),y)
...
...
@@ -308,7 +310,7 @@ vet:
@
go vet
$(SOURCE_PACKAGES)
.PHONY
:
golint
golint
:
golint
:
pkg/minikube/assets/assets.go pkg/minikube/translate/translations.go
@
golint
-set_exit_status
$(SOURCE_PACKAGES)
.PHONY
:
gocyclo
...
...
cmd/minikube/cmd/delete.go
浏览文件 @
96c39bf0
...
...
@@ -56,11 +56,15 @@ associated files.`,
type
typeOfError
int
const
(
Fatal
typeOfError
=
0
// Fatal is a type of DeletionError
Fatal
typeOfError
=
0
// MissingProfile is a type of DeletionError
MissingProfile
typeOfError
=
1
// MissingCluster is a type of DeletionError
MissingCluster
typeOfError
=
2
)
// DeletionError can be returned from DeleteProfiles
type
DeletionError
struct
{
Err
error
Errtype
typeOfError
...
...
@@ -118,7 +122,7 @@ func runDelete(cmd *cobra.Command, args []string) {
}
}
// Deletes one or more profiles
// Delete
Profiles delete
s one or more profiles
func
DeleteProfiles
(
profiles
[]
*
pkg_config
.
Profile
)
[]
error
{
var
errs
[]
error
for
_
,
profile
:=
range
profiles
{
...
...
@@ -246,7 +250,7 @@ func uninstallKubernetes(api libmachine.API, kc pkg_config.KubernetesConfig, bsN
return
nil
}
// Handle
s deletion error
from DeleteProfiles
// Handle
DeletionErrors handles deletion errors
from DeleteProfiles
func
HandleDeletionErrors
(
errors
[]
error
)
{
if
len
(
errors
)
==
1
{
handleSingleDeletionError
(
errors
[
0
])
...
...
cmd/minikube/cmd/start.go
浏览文件 @
96c39bf0
...
...
@@ -137,6 +137,7 @@ type kubectlversion struct {
SVersion
VersionInfo
`json:"serverVersion"`
}
// VersionInfo holds version information
type
VersionInfo
struct
{
Major
string
`json:"major"`
Minor
string
`json:"minor"`
...
...
pkg/minikube/bootstrapper/images/images.go
浏览文件 @
96c39bf0
...
...
@@ -26,7 +26,9 @@ import (
)
const
(
DefaultImageRepo
=
"k8s.gcr.io"
// DefaultImageRepo is the default repository for images
DefaultImageRepo
=
"k8s.gcr.io"
// DefaultMinikubeRepo is the default repository for minikube
DefaultMinikubeRepo
=
"gcr.io/k8s-minikube"
)
...
...
pkg/minikube/cluster/cluster.go
浏览文件 @
96c39bf0
...
...
@@ -604,8 +604,8 @@ func CreateSSHShell(api libmachine.API, args []string) error {
return
client
.
Shell
(
args
...
)
}
//
EnsureMinikubeRunningOrExit
checks that minikube has a status available and that
// the status is `Running`
, otherwise it will exit
//
IsMinikubeRunning
checks that minikube has a status available and that
// the status is `Running`
func
IsMinikubeRunning
(
api
libmachine
.
API
)
bool
{
s
,
err
:=
GetHostStatus
(
api
)
if
err
!=
nil
{
...
...
pkg/minikube/cluster/machine.go
浏览文件 @
96c39bf0
...
...
@@ -26,6 +26,7 @@ import (
"k8s.io/minikube/pkg/minikube/machine"
)
// Machine contains information about a machine
type
Machine
struct
{
*
host
.
Host
}
...
...
@@ -58,7 +59,7 @@ func (h *Machine) IsValid() bool {
return
true
}
// List
s
Machines return all valid and invalid machines
// ListMachines return all valid and invalid machines
// If a machine is valid or invalid is determined by the cluster.IsValid function
func
ListMachines
(
miniHome
...
string
)
(
validMachines
[]
*
Machine
,
inValidMachines
[]
*
Machine
,
err
error
)
{
pDirs
,
err
:=
machineDirs
(
miniHome
...
)
...
...
@@ -80,7 +81,7 @@ func ListMachines(miniHome ...string) (validMachines []*Machine, inValidMachines
return
validMachines
,
inValidMachines
,
nil
}
// Loads a machine or throws an error if the machine could not be loadedG
// Load
Machine load
s a machine or throws an error if the machine could not be loadedG
func
LoadMachine
(
name
string
)
(
*
Machine
,
error
)
{
api
,
err
:=
machine
.
NewAPIClient
()
if
err
!=
nil
{
...
...
pkg/minikube/config/profile.go
浏览文件 @
96c39bf0
...
...
@@ -136,7 +136,7 @@ func ListProfiles(miniHome ...string) (validPs []*Profile, inValidPs []*Profile,
return
validPs
,
inValidPs
,
nil
}
//
l
oadProfile loads type Profile based on its name
//
L
oadProfile loads type Profile based on its name
func
LoadProfile
(
name
string
,
miniHome
...
string
)
(
*
Profile
,
error
)
{
cfg
,
err
:=
DefaultLoader
.
LoadConfigFromFile
(
name
,
miniHome
...
)
p
:=
&
Profile
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录