Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Chu Peng 楚鹏
minikube
提交
f016dbb8
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,发现更多精彩内容 >>
未验证
提交
f016dbb8
编写于
10月 05, 2020
作者:
P
priyawadhwa
提交者:
GitHub
10月 05, 2020
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #9389 from afbjorklund/golint-cleanup
Do some simple cleanup of the golint complaints
上级
a46488dd
20fc9572
变更
13
隐藏空白更改
内联
并排
Showing
13 changed file
with
49 addition
and
6 deletion
+49
-6
cmd/minikube/cmd/status.go
cmd/minikube/cmd/status.go
+6
-0
pkg/minikube/cruntime/containerd.go
pkg/minikube/cruntime/containerd.go
+1
-0
pkg/minikube/cruntime/crio.go
pkg/minikube/cruntime/crio.go
+1
-0
pkg/minikube/cruntime/docker.go
pkg/minikube/cruntime/docker.go
+1
-0
pkg/minikube/download/json_output.go
pkg/minikube/download/json_output.go
+1
-0
pkg/minikube/driver/driver.go
pkg/minikube/driver/driver.go
+1
-1
pkg/minikube/out/register/cloud_events.go
pkg/minikube/out/register/cloud_events.go
+3
-1
pkg/minikube/out/register/log.go
pkg/minikube/out/register/log.go
+3
-0
pkg/minikube/reason/exitcodes.go
pkg/minikube/reason/exitcodes.go
+14
-0
pkg/minikube/reason/reason.go
pkg/minikube/reason/reason.go
+1
-0
pkg/minikube/tests/dir_utils.go
pkg/minikube/tests/dir_utils.go
+1
-0
pkg/perf/monitor/constants.go
pkg/perf/monitor/constants.go
+13
-4
pkg/util/utils.go
pkg/util/utils.go
+3
-0
未找到文件。
cmd/minikube/cmd/status.go
浏览文件 @
f016dbb8
...
...
@@ -57,6 +57,7 @@ var (
const
(
// Additional legacy states:
// Configured means configured
Configured
=
"Configured"
// ~state.Saved
// Misconfigured means misconfigured
...
...
@@ -67,7 +68,9 @@ const (
Irrelevant
=
"Irrelevant"
// New status modes, based roughly on HTTP/SMTP standards
// 1xx signifies a transitional state. If retried, it will soon return a 2xx, 4xx, or 5xx
Starting
=
100
Pausing
=
101
Unpausing
=
102
...
...
@@ -75,15 +78,18 @@ const (
Deleting
=
120
// 2xx signifies that the API Server is able to service requests
OK
=
200
Warning
=
203
// 4xx signifies an error that requires help from the client to resolve
NotFound
=
404
Stopped
=
405
Paused
=
418
// I'm a teapot!
// 5xx signifies a server-side error (that may be retryable)
Error
=
500
InsufficientStorage
=
507
Unknown
=
520
...
...
pkg/minikube/cruntime/containerd.go
浏览文件 @
f016dbb8
...
...
@@ -413,6 +413,7 @@ func containerdImagesPreloaded(runner command.Runner, images []string) bool {
return
true
}
// ImagesPreloaded returns true if all images have been preloaded
func
(
r
*
Containerd
)
ImagesPreloaded
(
images
[]
string
)
bool
{
return
containerdImagesPreloaded
(
r
.
Runner
,
images
)
}
pkg/minikube/cruntime/crio.go
浏览文件 @
f016dbb8
...
...
@@ -326,6 +326,7 @@ func crioImagesPreloaded(runner command.Runner, images []string) bool {
return
true
}
// ImagesPreloaded returns true if all images have been preloaded
func
(
r
*
CRIO
)
ImagesPreloaded
(
images
[]
string
)
bool
{
return
crioImagesPreloaded
(
r
.
Runner
,
images
)
}
...
...
pkg/minikube/cruntime/docker.go
浏览文件 @
f016dbb8
...
...
@@ -405,6 +405,7 @@ func dockerBoundToContainerd(runner command.Runner) bool {
return
false
}
// ImagesPreloaded returns true if all images have been preloaded
func
(
r
*
Docker
)
ImagesPreloaded
(
images
[]
string
)
bool
{
return
dockerImagesPreloaded
(
r
.
Runner
,
images
)
}
pkg/minikube/download/json_output.go
浏览文件 @
f016dbb8
...
...
@@ -26,6 +26,7 @@ import (
"k8s.io/minikube/pkg/minikube/out/register"
)
// DefaultJSONOutput is a progress tracker with JSON output
var
DefaultJSONOutput
getter
.
ProgressTracker
=
&
jsonOutput
{}
type
jsonOutput
struct
{
...
...
pkg/minikube/driver/driver.go
浏览文件 @
f016dbb8
...
...
@@ -112,7 +112,7 @@ func IsDocker(name string) bool {
return
name
==
Docker
}
// Is
KIC
checks if the driver is a Docker for Desktop (Docker on windows or MacOs)
// Is
DockerDesktop
checks if the driver is a Docker for Desktop (Docker on windows or MacOs)
// for linux and exotic archs, this will be false
func
IsDockerDesktop
(
name
string
)
bool
{
if
IsDocker
(
name
)
{
...
...
pkg/minikube/out/register/cloud_events.go
浏览文件 @
f016dbb8
...
...
@@ -33,7 +33,9 @@ const (
var
(
outputFile
io
.
Writer
=
os
.
Stdout
GetUUID
=
randomID
//GetUUID returns the UUID function to use
GetUUID
=
randomID
eventFile
*
os
.
File
)
...
...
pkg/minikube/out/register/log.go
浏览文件 @
f016dbb8
...
...
@@ -110,6 +110,7 @@ type Info struct {
data
map
[
string
]
string
}
// Type returns the cloud events compatible type of this struct
func
(
s
*
Info
)
Type
()
string
{
return
"io.k8s.sigs.minikube.info"
}
...
...
@@ -128,6 +129,7 @@ type Error struct {
data
map
[
string
]
string
}
// NewError returns a new Error type
func
NewError
(
err
string
)
*
Error
{
return
&
Error
{
map
[
string
]
string
{
...
...
@@ -148,6 +150,7 @@ func NewErrorExitCode(err string, exitcode int, additionalData ...map[string]str
return
e
}
// Type returns the cloud events compatible type of this struct
func
(
s
*
Error
)
Type
()
string
{
return
"io.k8s.sigs.minikube.error"
}
pkg/minikube/reason/exitcodes.go
浏览文件 @
f016dbb8
...
...
@@ -34,6 +34,7 @@ package reason
const
(
// Reserved UNIX exit codes
ExFailure
=
1
// Failure represents a general failure code
ExInterrupted
=
2
// Ctrl-C (SIGINT)
...
...
@@ -56,6 +57,7 @@ const (
// navailableOff = 9 // (~EX_UNAVAILABLE)
// Error codes specific to the minikube program
ExProgramError
=
10
// generic error
ExProgramUsage
=
14
// bad command-line options
ExProgramConflict
=
11
// can't do what you want because of existing data
...
...
@@ -64,6 +66,7 @@ const (
ExProgramConfig
=
18
// bad configuration specified
// Error codes specific to resource limits (exit code layout follows no rules)
ExResourceError
=
20
ExInsufficientMemory
=
23
ExInsufficientStorage
=
26
...
...
@@ -71,6 +74,7 @@ const (
ExInsufficientCores
=
29
// Error codes specific to the host
ExHostError
=
30
ExHostConflict
=
31
ExHostTimeout
=
32
...
...
@@ -81,6 +85,7 @@ const (
ExHostConfig
=
38
// Error codes specific to remote networking
ExInternetError
=
40
ExInternetConflict
=
41
ExInternetTimeout
=
42
...
...
@@ -89,6 +94,7 @@ const (
ExInternetUnavailable
=
49
// Error codes specific to the libmachine driver
ExDriverError
=
50
ExDriverConflict
=
51
ExDriverTimeout
=
52
...
...
@@ -100,11 +106,14 @@ const (
ExDriverUnavailable
=
59
// Error codes specific to the driver provider
ExProviderError
=
60
ExProviderConflict
=
61
ExProviderTimeout
=
62
ExProviderNotRunning
=
63
// Reserve 64 for the moment as it used to be usage
ExProviderNotFound
=
65
ExProviderUnsupported
=
66
ExProviderPermission
=
67
...
...
@@ -112,6 +121,7 @@ const (
ExProviderUnavailable
=
69
// In common use
// Error codes specific to local networking
ExLocalNetworkError
=
70
ExLocalNetworkConflict
=
71
ExLocalNetworkTimeout
=
72
...
...
@@ -121,6 +131,7 @@ const (
ExLocalNetworkUnavailable
=
79
// Error codes specific to the guest host
ExGuestError
=
80
ExGuestConflict
=
81
ExGuestTimeout
=
82
...
...
@@ -132,12 +143,14 @@ const (
ExGuestUnavailable
=
89
// Error codes specific to the container runtime
ExRuntimeError
=
90
ExRuntimeNotRunning
=
93
ExRuntimeNotFound
=
95
ExRuntimeUnavailable
=
99
// Error codes specific to the Kubernetes control plane
ExControlPlaneError
=
100
ExControlPlaneConflict
=
101
ExControlPlaneTimeout
=
102
...
...
@@ -148,6 +161,7 @@ const (
ExControlPlaneUnavailable
=
109
// Error codes specific to a Kubernetes service
ExSvcError
=
110
ExSvcConflict
=
111
ExSvcTimeout
=
112
...
...
pkg/minikube/reason/reason.go
浏览文件 @
f016dbb8
...
...
@@ -61,6 +61,7 @@ type Kind struct {
NoMatch
bool
}
// IssueURLs returns URLs for issues
func
(
k
*
Kind
)
IssueURLs
()
[]
string
{
is
:=
[]
string
{}
for
_
,
i
:=
range
k
.
Issues
{
...
...
pkg/minikube/tests/dir_utils.go
浏览文件 @
f016dbb8
...
...
@@ -45,6 +45,7 @@ func MakeTempDir() string {
return
localpath
.
MiniPath
()
}
// RemoveTempDir removes the temp dir
func
RemoveTempDir
(
tempdir
string
)
{
if
filepath
.
Base
(
tempdir
)
==
".minikube"
{
tempdir
=
filepath
.
Dir
(
tempdir
)
...
...
pkg/perf/monitor/constants.go
浏览文件 @
f016dbb8
...
...
@@ -17,9 +17,18 @@ limitations under the License.
package
monitor
const
(
// GithubAccessTokenEnvVar is the env var name to use
GithubAccessTokenEnvVar
=
"GITHUB_ACCESS_TOKEN"
OkToTestLabel
=
"ok-to-test"
GithubOwner
=
"kubernetes"
GithubRepo
=
"minikube"
BotName
=
"minikube-pr-bot"
// OkToTestLabel is the github label for ok-to-test
OkToTestLabel
=
"ok-to-test"
// GithubOwner is the owner of the github repository
GithubOwner
=
"kubernetes"
// GithubRepo is the name of the github repository
GithubRepo
=
"minikube"
// BotName is the name of the minikube Pull Request bot
BotName
=
"minikube-pr-bot"
)
pkg/util/utils.go
浏览文件 @
f016dbb8
...
...
@@ -47,14 +47,17 @@ func CalculateSizeInMB(humanReadableSize string) (int, error) {
return
int
(
size
/
units
.
MiB
),
nil
}
// ConvertMBToBytes converts MB to bytes
func
ConvertMBToBytes
(
mbSize
int
)
int64
{
return
int64
(
mbSize
)
*
units
.
MiB
}
// ConvertBytesToMB converts bytes to MB
func
ConvertBytesToMB
(
byteSize
int64
)
int
{
return
int
(
ConvertUnsignedBytesToMB
(
uint64
(
byteSize
)))
}
// ConvertUnsignedBytesToMB converts bytes to MB
func
ConvertUnsignedBytesToMB
(
byteSize
uint64
)
int64
{
return
int64
(
byteSize
/
units
.
MiB
)
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录