Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Chu Peng 楚鹏
minikube
提交
3555ae5f
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,发现更多精彩内容 >>
未验证
提交
3555ae5f
编写于
7月 17, 2019
作者:
T
Thomas Strömberg
提交者:
GitHub
7月 17, 2019
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'master' into not-an-err
上级
80fc1016
03fb0632
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
96 addition
and
4 deletion
+96
-4
deploy/addons/registry/registry-proxy.yaml.tmpl
deploy/addons/registry/registry-proxy.yaml.tmpl
+2
-1
pkg/minikube/constants/constants_darwin.go
pkg/minikube/constants/constants_darwin.go
+1
-1
pkg/minikube/exit/exit.go
pkg/minikube/exit/exit.go
+2
-2
pkg/minikube/extract/extract.go
pkg/minikube/extract/extract.go
+1
-0
test/integration/addons_test.go
test/integration/addons_test.go
+67
-0
test/integration/functional_test.go
test/integration/functional_test.go
+1
-0
test/integration/util/util.go
test/integration/util/util.go
+22
-0
未找到文件。
deploy/addons/registry/registry-proxy.yaml.tmpl
浏览文件 @
3555ae5f
...
...
@@ -2,7 +2,7 @@ apiVersion: extensions/v1beta1
kind: DaemonSet
metadata:
labels:
kubernetes.io/minikube-addons: registry
kubernetes.io/minikube-addons: registry
-proxy
addonmanager.kubernetes.io/mode: Reconcile
name: registry-proxy
namespace: kube-system
...
...
@@ -10,6 +10,7 @@ spec:
template:
metadata:
labels:
kubernetes.io/minikube-addons: registry-proxy
addonmanager.kubernetes.io/mode: Reconcile
spec:
containers:
...
...
pkg/minikube/constants/constants_darwin.go
浏览文件 @
3555ae5f
...
...
@@ -25,6 +25,6 @@ var SupportedVMDrivers = [...]string{
DriverVirtualbox
,
DriverParallels
,
DriverVmwareFusion
,
DriverHyper
K
it
,
DriverHyper
k
it
,
DriverVmware
,
}
pkg/minikube/exit/exit.go
浏览文件 @
3555ae5f
...
...
@@ -75,7 +75,7 @@ func WithProblem(msg string, p *problem.Problem) {
p
.
Display
()
console
.
Err
(
"
\n
"
)
console
.
ErrStyle
(
console
.
Sad
,
"If the above advice does not help, please let us know: "
)
console
.
ErrStyle
(
console
.
URL
,
"https://github.com/kubernetes/minikube/issues/new"
)
console
.
ErrStyle
(
console
.
URL
,
"https://github.com/kubernetes/minikube/issues/new
/choose
"
)
os
.
Exit
(
Config
)
}
...
...
@@ -102,5 +102,5 @@ func displayError(msg string, err error) {
console
.
Fatal
(
"%s: %v"
,
msg
,
err
)
console
.
Err
(
"
\n
"
)
console
.
ErrStyle
(
console
.
Sad
,
"Sorry that minikube crashed. If this was unexpected, we would love to hear from you:"
)
console
.
ErrStyle
(
console
.
URL
,
"https://github.com/kubernetes/minikube/issues/new"
)
console
.
ErrStyle
(
console
.
URL
,
"https://github.com/kubernetes/minikube/issues/new
/choose
"
)
}
pkg/minikube/extract/extract.go
浏览文件 @
3555ae5f
...
...
@@ -47,6 +47,7 @@ var blacklist = []string{
"opt %s"
,
}
// ErrMapFile is a constant to refer to the err_map file, which contains the Advice strings.
const
ErrMapFile
string
=
"pkg/minikube/problem/err_map.go"
// state is a struct that represent the current state of the extraction process
...
...
test/integration/addons_test.go
浏览文件 @
3555ae5f
...
...
@@ -190,7 +190,74 @@ func testServicesList(t *testing.T) {
t
.
Fatalf
(
err
.
Error
())
}
}
func
testRegistry
(
t
*
testing
.
T
)
{
t
.
Parallel
()
minikubeRunner
:=
NewMinikubeRunner
(
t
)
kubectlRunner
:=
util
.
NewKubectlRunner
(
t
)
minikubeRunner
.
RunCommand
(
"addons enable registry"
,
true
)
t
.
Log
(
"wait for registry to come up"
)
if
err
:=
util
.
WaitForDockerRegistryRunning
(
t
);
err
!=
nil
{
t
.
Fatalf
(
"waiting for registry to be up: %v"
,
err
)
}
// Check access from outside the cluster on port 5000, validing connectivity via registry-proxy
checkExternalAccess
:=
func
()
error
{
t
.
Log
(
"checking registry access from outside cluster"
)
_
,
out
:=
minikubeRunner
.
RunDaemon
(
"ip"
)
s
,
err
:=
readLineWithTimeout
(
out
,
180
*
time
.
Second
)
if
err
!=
nil
{
t
.
Fatalf
(
"failed to read minikubeIP: %v"
,
err
)
}
registryEndpoint
:=
"http://"
+
strings
.
TrimSpace
(
s
)
+
":5000"
u
,
err
:=
url
.
Parse
(
registryEndpoint
)
if
err
!=
nil
{
t
.
Fatalf
(
"failed to parse %q: %v"
,
s
,
err
)
}
resp
,
err
:=
retryablehttp
.
Get
(
u
.
String
())
if
err
!=
nil
{
t
.
Errorf
(
"failed get: %v"
,
err
)
}
if
resp
.
StatusCode
!=
http
.
StatusOK
{
t
.
Errorf
(
"%s returned status code %d, expected %d.
\n
"
,
registryEndpoint
,
resp
.
StatusCode
,
http
.
StatusOK
)
}
return
nil
}
if
err
:=
util
.
Retry
(
t
,
checkExternalAccess
,
2
*
time
.
Second
,
5
);
err
!=
nil
{
t
.
Fatalf
(
err
.
Error
())
}
// check access from inside the cluster via a busybox container running inside cluster
t
.
Log
(
"checking registry access from inside cluster"
)
expectedStr
:=
"200"
out
,
_
:=
kubectlRunner
.
RunCommand
([]
string
{
"run"
,
"registry-test"
,
"--restart=Never"
,
"--image=busybox"
,
"-it"
,
"--"
,
"sh"
,
"-c"
,
"wget --spider -S 'http://registry.kube-system.svc.cluster.local' 2>&1 | grep 'HTTP/' | awk '{print $2}'"
})
internalCheckOutput
:=
string
(
out
)
if
!
strings
.
Contains
(
internalCheckOutput
,
expectedStr
)
{
t
.
Fatalf
(
"ExpectedStr internalCheckOutput to be: %s. Output was: %s"
,
expectedStr
,
internalCheckOutput
)
}
defer
func
()
{
if
_
,
err
:=
kubectlRunner
.
RunCommand
([]
string
{
"delete"
,
"pod"
,
"registry-test"
});
err
!=
nil
{
t
.
Fatalf
(
"failed to delete pod registry-test"
)
}
}()
minikubeRunner
.
RunCommand
(
"addons disable registry"
,
true
)
}
func
testGvisor
(
t
*
testing
.
T
)
{
minikubeRunner
:=
NewMinikubeRunner
(
t
)
minikubeRunner
.
RunCommand
(
"addons enable gvisor"
,
true
)
...
...
test/integration/functional_test.go
浏览文件 @
3555ae5f
...
...
@@ -36,6 +36,7 @@ func TestFunctional(t *testing.T) {
t
.
Run
(
"DNS"
,
testClusterDNS
)
t
.
Run
(
"Logs"
,
testClusterLogs
)
t
.
Run
(
"Addons"
,
testAddons
)
t
.
Run
(
"Registry"
,
testRegistry
)
t
.
Run
(
"Dashboard"
,
testDashboard
)
t
.
Run
(
"ServicesList"
,
testServicesList
)
t
.
Run
(
"Provisioning"
,
testProvisioning
)
...
...
test/integration/util/util.go
浏览文件 @
3555ae5f
...
...
@@ -359,6 +359,28 @@ func WaitForIngressControllerRunning(t *testing.T) error {
return
nil
}
// WaitForDockerRegistryRunning waits until docker registry pod to be running
func
WaitForDockerRegistryRunning
(
t
*
testing
.
T
)
error
{
client
,
err
:=
commonutil
.
GetClient
()
if
err
!=
nil
{
return
errors
.
Wrap
(
err
,
"getting kubernetes client"
)
}
if
err
:=
commonutil
.
WaitForRCToStabilize
(
client
,
"kube-system"
,
"registry"
,
time
.
Minute
*
10
);
err
!=
nil
{
return
errors
.
Wrap
(
err
,
"waiting for registry replicacontroller to stabilize"
)
}
registrySelector
:=
labels
.
SelectorFromSet
(
labels
.
Set
(
map
[
string
]
string
{
"kubernetes.io/minikube-addons"
:
"registry"
}))
if
err
:=
commonutil
.
WaitForPodsWithLabelRunning
(
client
,
"kube-system"
,
registrySelector
);
err
!=
nil
{
return
errors
.
Wrap
(
err
,
"waiting for registry pods"
)
}
proxySelector
:=
labels
.
SelectorFromSet
(
labels
.
Set
(
map
[
string
]
string
{
"kubernetes.io/minikube-addons"
:
"registry-proxy"
}))
if
err
:=
commonutil
.
WaitForPodsWithLabelRunning
(
client
,
"kube-system"
,
proxySelector
);
err
!=
nil
{
return
errors
.
Wrap
(
err
,
"waiting for registry-proxy pods"
)
}
return
nil
}
// WaitForIngressDefaultBackendRunning waits until ingress default backend pod to be running
func
WaitForIngressDefaultBackendRunning
(
t
*
testing
.
T
)
error
{
client
,
err
:=
commonutil
.
GetClient
()
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录