Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Chu Peng 楚鹏
minikube
提交
3c9e96ea
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,发现更多精彩内容 >>
未验证
提交
3c9e96ea
编写于
7月 10, 2020
作者:
M
Medya Ghazizadeh
提交者:
GitHub
7月 10, 2020
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #8684 from tstromberg/none-cni
none CNI: error if portmap plug-in is required but unavailable
上级
231bf12c
0b3e2ae7
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
26 addition
and
1 deletion
+26
-1
pkg/minikube/cni/flannel.go
pkg/minikube/cni/flannel.go
+9
-0
pkg/minikube/cni/kindnet.go
pkg/minikube/cni/kindnet.go
+7
-0
test/integration/net_test.go
test/integration/net_test.go
+10
-1
未找到文件。
pkg/minikube/cni/flannel.go
浏览文件 @
3c9e96ea
...
...
@@ -17,6 +17,9 @@ limitations under the License.
package
cni
import
(
"os/exec"
"github.com/pkg/errors"
"k8s.io/minikube/pkg/minikube/config"
)
...
...
@@ -637,6 +640,12 @@ func (c Flannel) String() string {
// Apply enables the CNI
func
(
c
Flannel
)
Apply
(
r
Runner
)
error
{
// Mostly applicable to the 'none' driver
_
,
err
:=
r
.
RunCmd
(
exec
.
Command
(
"stat"
,
"/opt/cni/bin/portmap"
))
if
err
!=
nil
{
return
errors
.
Wrap
(
err
,
"required 'portmap' CNI plug-in not found"
)
}
return
applyManifest
(
c
.
cc
,
r
,
manifestAsset
([]
byte
(
flannelTmpl
)))
}
...
...
pkg/minikube/cni/kindnet.go
浏览文件 @
3c9e96ea
...
...
@@ -18,6 +18,7 @@ package cni
import
(
"bytes"
"os/exec"
"text/template"
"github.com/pkg/errors"
...
...
@@ -168,6 +169,12 @@ func (c KindNet) manifest() (assets.CopyableFile, error) {
// Apply enables the CNI
func
(
c
KindNet
)
Apply
(
r
Runner
)
error
{
// This is mostly applicable to the 'none' driver
_
,
err
:=
r
.
RunCmd
(
exec
.
Command
(
"stat"
,
"/opt/cni/bin/portmap"
))
if
err
!=
nil
{
return
errors
.
Wrap
(
err
,
"required 'portmap' CNI plug-in not found"
)
}
m
,
err
:=
c
.
manifest
()
if
err
!=
nil
{
return
errors
.
Wrap
(
err
,
"manifest"
)
...
...
test/integration/net_test.go
浏览文件 @
3c9e96ea
...
...
@@ -90,7 +90,16 @@ func TestNetworkPlugins(t *testing.T) {
}
if
!
t
.
Failed
()
{
t
.
Run
(
"KubeletFlags"
,
func
(
t
*
testing
.
T
)
{
rr
,
err
:=
Run
(
t
,
exec
.
CommandContext
(
ctx
,
Target
(),
"ssh"
,
"-p"
,
profile
,
"pgrep -a kubelet"
))
var
rr
*
RunResult
var
err
error
// none does not support 'minikube ssh'
if
NoneDriver
()
{
rr
,
err
=
Run
(
t
,
exec
.
CommandContext
(
ctx
,
"pgrep"
,
"-a"
,
"kubelet"
))
}
else
{
rr
,
err
=
Run
(
t
,
exec
.
CommandContext
(
ctx
,
Target
(),
"ssh"
,
"-p"
,
profile
,
"pgrep -a kubelet"
))
}
if
err
!=
nil
{
t
.
Fatalf
(
"ssh failed: %v"
,
err
)
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录