Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Chu Peng 楚鹏
minikube
提交
e2f3a9ff
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,发现更多精彩内容 >>
未验证
提交
e2f3a9ff
编写于
2月 08, 2021
作者:
M
Medya Ghazizadeh
提交者:
GitHub
2月 08, 2021
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #10401 from afbjorklund/lint-cleanup
Clean up accumulated golint with missing godoc
上级
d6f7f692
f316c0fd
变更
8
隐藏空白更改
内联
并排
Showing
8 changed file
with
19 addition
and
2 deletion
+19
-2
pkg/drivers/ssh/ssh.go
pkg/drivers/ssh/ssh.go
+8
-0
pkg/minikube/bootstrapper/bsutil/kverify/kverify.go
pkg/minikube/bootstrapper/bsutil/kverify/kverify.go
+1
-1
pkg/minikube/cni/cni.go
pkg/minikube/cni/cni.go
+1
-0
pkg/minikube/constants/constants.go
pkg/minikube/constants/constants.go
+4
-1
pkg/minikube/kubeconfig/extension.go
pkg/minikube/kubeconfig/extension.go
+2
-0
pkg/minikube/machine/ssh.go
pkg/minikube/machine/ssh.go
+1
-0
pkg/minikube/sshutil/sshutil.go
pkg/minikube/sshutil/sshutil.go
+1
-0
pkg/minikube/style/style.go
pkg/minikube/style/style.go
+1
-0
未找到文件。
pkg/drivers/ssh/ssh.go
浏览文件 @
e2f3a9ff
...
...
@@ -85,18 +85,22 @@ func (d *Driver) DriverName() string {
return
"ssh"
}
// GetSSHHostname returns hostname for use with ssh
func
(
d
*
Driver
)
GetSSHHostname
()
(
string
,
error
)
{
return
d
.
GetIP
()
}
// GetSSHUsername returns username for use with ssh
func
(
d
*
Driver
)
GetSSHUsername
()
string
{
return
d
.
SSHUser
}
// GetSSHKeyPath returns the key path for SSH
func
(
d
*
Driver
)
GetSSHKeyPath
()
string
{
return
d
.
SSHKeyPath
}
// PreCreateCheck checks for correct privileges and dependencies
func
(
d
*
Driver
)
PreCreateCheck
()
error
{
if
d
.
SSHKey
!=
""
{
if
_
,
err
:=
os
.
Stat
(
d
.
SSHKey
);
os
.
IsNotExist
(
err
)
{
...
...
@@ -107,6 +111,7 @@ func (d *Driver) PreCreateCheck() error {
return
nil
}
// Create a host using the driver's config
func
(
d
*
Driver
)
Create
()
error
{
if
d
.
SSHKey
==
""
{
log
.
Info
(
"No SSH key specified. Assuming an existing key at the default location."
)
...
...
@@ -134,6 +139,7 @@ func (d *Driver) Create() error {
return
nil
}
// GetURL returns a Docker URL inside this host
func
(
d
*
Driver
)
GetURL
()
(
string
,
error
)
{
if
err
:=
drivers
.
MustBeRunning
(
d
);
err
!=
nil
{
return
""
,
err
...
...
@@ -147,6 +153,7 @@ func (d *Driver) GetURL() (string, error) {
return
fmt
.
Sprintf
(
"tcp://%s"
,
net
.
JoinHostPort
(
ip
,
strconv
.
Itoa
(
d
.
EnginePort
))),
nil
}
// GetState returns the state that the host is in (running, stopped, etc)
func
(
d
*
Driver
)
GetState
()
(
state
.
State
,
error
)
{
address
:=
net
.
JoinHostPort
(
d
.
IPAddress
,
strconv
.
Itoa
(
d
.
SSHPort
))
...
...
@@ -224,6 +231,7 @@ func (d *Driver) Kill() error {
return
nil
}
// Remove a host, including any data which may have been written by it.
func
(
d
*
Driver
)
Remove
()
error
{
return
nil
}
...
...
pkg/minikube/bootstrapper/bsutil/kverify/kverify.go
浏览文件 @
e2f3a9ff
...
...
@@ -35,7 +35,7 @@ const (
AppsRunningKey
=
"apps_running"
// NodeReadyKey is the name used in the flags for waiting for the node status to be ready
NodeReadyKey
=
"node_ready"
//
NodeReadyKey is the name used in the flags for waiting for the node
status to be ready
//
KubeletKey is the name used in the flags for waiting for the kubelet
status to be ready
KubeletKey
=
"kubelet"
)
...
...
pkg/minikube/cni/cni.go
浏览文件 @
e2f3a9ff
...
...
@@ -93,6 +93,7 @@ func New(cc config.ClusterConfig) (Manager, error) {
}
}
// IsDisabled checks if CNI is disabled
func
IsDisabled
(
cc
config
.
ClusterConfig
)
bool
{
if
cc
.
KubernetesConfig
.
NetworkPlugin
!=
""
&&
cc
.
KubernetesConfig
.
NetworkPlugin
!=
"cni"
{
return
true
...
...
pkg/minikube/constants/constants.go
浏览文件 @
e2f3a9ff
...
...
@@ -84,7 +84,10 @@ const (
TestDiskUsedEnv
=
"MINIKUBE_TEST_STORAGE_CAPACITY"
// scheduled stop constants
ScheduledStopEnvFile
=
"/var/lib/minikube/scheduled-stop/environment"
// ScheduledStopEnvFile is the environment file for scheduled-stop
ScheduledStopEnvFile
=
"/var/lib/minikube/scheduled-stop/environment"
// ScheduledStopSystemdService is the service file for scheduled-stop
ScheduledStopSystemdService
=
"minikube-scheduled-stop"
// MinikubeExistingPrefix is used to save the original environment when executing docker-env
...
...
pkg/minikube/kubeconfig/extension.go
浏览文件 @
e2f3a9ff
...
...
@@ -25,6 +25,8 @@ import (
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// implementing the runtime.Object internally so we can write extensions to kubeconfig
// Extension represents information to identify clusters and contexts
type
Extension
struct
{
runtime
.
TypeMeta
`json:",inline"`
Version
string
`json:"version"`
...
...
pkg/minikube/machine/ssh.go
浏览文件 @
e2f3a9ff
...
...
@@ -68,6 +68,7 @@ func CreateSSHShell(api libmachine.API, cc config.ClusterConfig, n config.Node,
return
client
.
Shell
(
args
...
)
}
// GetSSHHostAddrPort returns the host address and port for ssh
func
GetSSHHostAddrPort
(
api
libmachine
.
API
,
cc
config
.
ClusterConfig
,
n
config
.
Node
)
(
string
,
int
,
error
)
{
host
,
err
:=
getHost
(
api
,
cc
,
n
)
if
err
!=
nil
{
...
...
pkg/minikube/sshutil/sshutil.go
浏览文件 @
e2f3a9ff
...
...
@@ -93,6 +93,7 @@ func newSSHHost(d drivers.Driver) (*sshHost, error) {
},
nil
}
// KnownHost checks if this host is in the knownHosts file
func
KnownHost
(
host
string
,
knownHosts
string
)
bool
{
fd
,
err
:=
os
.
Open
(
knownHosts
)
if
err
!=
nil
{
...
...
pkg/minikube/style/style.go
浏览文件 @
e2f3a9ff
...
...
@@ -45,6 +45,7 @@ type Options struct {
Spinner
bool
}
// SpinnerCharacter is which of the spinner.CharSets to use
const
SpinnerCharacter
=
9
// Config is a map of style name to style struct
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录