Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Chu Peng 楚鹏
minikube
提交
a358aff0
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,发现更多精彩内容 >>
提交
a358aff0
编写于
12月 21, 2019
作者:
M
Medya Gh
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix ocibinary
上级
91af8032
变更
9
隐藏空白更改
内联
并排
Showing
9 changed file
with
41 addition
and
31 deletion
+41
-31
cmd/minikube/cmd/config/configure.go
cmd/minikube/cmd/config/configure.go
+7
-7
pkg/drivers/kic/kic.go
pkg/drivers/kic/kic.go
+1
-0
pkg/drivers/kic/node/node.go
pkg/drivers/kic/node/node.go
+7
-5
pkg/drivers/kic/oci/oci.go
pkg/drivers/kic/oci/oci.go
+1
-0
pkg/drivers/kic/oci/types.go
pkg/drivers/kic/oci/types.go
+5
-0
pkg/minikube/config/config_test.go
pkg/minikube/config/config_test.go
+4
-4
pkg/minikube/registry/drvs/docker/docker.go
pkg/minikube/registry/drvs/docker/docker.go
+3
-2
pkg/minikube/service/service_test.go
pkg/minikube/service/service_test.go
+12
-12
pkg/util/crypto.go
pkg/util/crypto.go
+1
-1
未找到文件。
cmd/minikube/cmd/config/configure.go
浏览文件 @
a358aff0
...
...
@@ -103,8 +103,8 @@ var addonsConfigureCmd = &cobra.Command{
"aws-assume-role"
:
awsRole
,
},
map
[
string
]
string
{
"app"
:
"registry-creds"
,
"cloud"
:
"ecr"
,
"app"
:
"registry-creds"
,
"cloud"
:
"ecr"
,
"kubernetes.io/minikube-addons"
:
"registry-creds"
,
})
...
...
@@ -118,11 +118,11 @@ var addonsConfigureCmd = &cobra.Command{
"registry-creds-gcr"
,
map
[
string
]
string
{
"application_default_credentials.json"
:
gcrApplicationDefaultCredentials
,
"gcrurl"
:
gcrURL
,
"gcrurl"
:
gcrURL
,
},
map
[
string
]
string
{
"app"
:
"registry-creds"
,
"cloud"
:
"gcr"
,
"app"
:
"registry-creds"
,
"cloud"
:
"gcr"
,
"kubernetes.io/minikube-addons"
:
"registry-creds"
,
})
...
...
@@ -140,8 +140,8 @@ var addonsConfigureCmd = &cobra.Command{
"DOCKER_PRIVATE_REGISTRY_PASSWORD"
:
dockerPass
,
},
map
[
string
]
string
{
"app"
:
"registry-creds"
,
"cloud"
:
"dpr"
,
"app"
:
"registry-creds"
,
"cloud"
:
"dpr"
,
"kubernetes.io/minikube-addons"
:
"registry-creds"
,
})
...
...
pkg/drivers/kic/kic.go
浏览文件 @
a358aff0
...
...
@@ -64,6 +64,7 @@ func NewDriver(c Config) *Driver {
},
exec
:
command
.
NewKICRunner
(
c
.
MachineName
,
c
.
OCIBinary
),
NodeConfig
:
c
,
OCIBinary
:
c
.
OCIBinary
,
}
return
d
}
...
...
pkg/drivers/kic/node/node.go
浏览文件 @
a358aff0
...
...
@@ -39,8 +39,8 @@ const (
// Node represents a handle to a kic node
// This struct must be created by one of: CreateControlPlane
type
Node
struct
{
// must be one of docker container ID or name
name
string
id
string
// container id
name
string
// container name
r
command
.
Runner
// Runner
ociBinary
string
}
...
...
@@ -123,13 +123,15 @@ func CreateNode(p CreateConfig) (*Node, error) {
// Find finds a node
func
Find
(
ociBinary
string
,
name
string
,
cmder
command
.
Runner
)
(
*
Node
,
error
)
{
_
,
err
:=
oci
.
Inspect
(
ociBinary
,
name
,
"{{.Id}}"
)
n
,
err
:=
oci
.
Inspect
(
ociBinary
,
name
,
"{{.Id}}"
)
if
err
!=
nil
{
return
nil
,
fmt
.
Errorf
(
"can't find node %v"
,
err
)
}
return
&
Node
{
name
:
name
,
r
:
cmder
,
ociBinary
:
ociBinary
,
id
:
n
[
0
],
name
:
name
,
r
:
cmder
,
},
nil
}
...
...
pkg/drivers/kic/oci/oci.go
浏览文件 @
a358aff0
...
...
@@ -121,6 +121,7 @@ func Inspect(ociBinary string, containerNameOrID, format string) ([]string, erro
for
scanner
.
Scan
()
{
lines
=
append
(
lines
,
scanner
.
Text
())
}
fmt
.
Printf
(
"lines %+v err %v"
,
lines
,
err
)
return
lines
,
err
}
...
...
pkg/drivers/kic/oci/types.go
浏览文件 @
a358aff0
...
...
@@ -16,6 +16,11 @@ limitations under the License.
package
oci
const
(
Docker
=
"docker"
Podman
=
"podman"
)
/*
These types are from
https://github.com/kubernetes/kubernetes/blob/063e7ff358fdc8b0916e6f39beedc0d025734cb1/pkg/kubelet/apis/cri/runtime/v1alpha2/api.pb.go#L183
...
...
pkg/minikube/config/config_test.go
浏览文件 @
a358aff0
...
...
@@ -49,10 +49,10 @@ var configTestCases = []configTestCase{
"vm-driver": "test-driver"
}`
,
config
:
map
[
string
]
interface
{}{
"vm-driver"
:
"test-driver"
,
"cpus"
:
4
,
"disk-size"
:
"20g"
,
"v"
:
5
,
"vm-driver"
:
"test-driver"
,
"cpus"
:
4
,
"disk-size"
:
"20g"
,
"v"
:
5
,
"show-libmachine-logs"
:
true
,
"log_dir"
:
"/etc/hosts"
,
"ReminderWaitPeriodInHours"
:
99
,
...
...
pkg/minikube/registry/drvs/docker/docker.go
浏览文件 @
a358aff0
...
...
@@ -23,6 +23,7 @@ import (
"github.com/docker/machine/libmachine/drivers"
"github.com/golang/glog"
"k8s.io/minikube/pkg/drivers/kic"
"k8s.io/minikube/pkg/drivers/kic/oci"
"k8s.io/minikube/pkg/minikube/config"
"k8s.io/minikube/pkg/minikube/driver"
"k8s.io/minikube/pkg/minikube/localpath"
...
...
@@ -33,7 +34,7 @@ func init() {
if
err
:=
registry
.
Register
(
registry
.
DriverDef
{
Name
:
driver
.
Docker
,
Config
:
configure
,
Init
:
func
()
drivers
.
Driver
{
return
kic
.
NewDriver
(
kic
.
Config
{})
},
Init
:
func
()
drivers
.
Driver
{
return
kic
.
NewDriver
(
kic
.
Config
{
OCIBinary
:
oci
.
Docker
})
},
Status
:
status
,
Priority
:
registry
.
Discouraged
,
// experimental
});
err
!=
nil
{
...
...
@@ -53,7 +54,7 @@ func configure(mc config.MachineConfig) interface{} {
CPU
:
mc
.
CPUs
,
Memory
:
mc
.
Memory
,
APIServerPort
:
mc
.
NodeBindPort
,
OCIBinary
:
"docker"
,
OCIBinary
:
oci
.
Docker
,
})
}
...
...
pkg/minikube/service/service_test.go
浏览文件 @
a358aff0
...
...
@@ -364,30 +364,30 @@ func TestOptionallyHttpsFormattedUrlString(t *testing.T) {
expectedIsHTTPSchemedURL
bool
}{
{
description
:
"no https for http schemed with no https option"
,
bareURLString
:
"http://192.168.99.100:30563"
,
https
:
false
,
description
:
"no https for http schemed with no https option"
,
bareURLString
:
"http://192.168.99.100:30563"
,
https
:
false
,
expectedHTTPSFormattedURLString
:
"http://192.168.99.100:30563"
,
expectedIsHTTPSchemedURL
:
true
,
},
{
description
:
"no https for non-http schemed with no https option"
,
bareURLString
:
"xyz.http.myservice:30563"
,
https
:
false
,
description
:
"no https for non-http schemed with no https option"
,
bareURLString
:
"xyz.http.myservice:30563"
,
https
:
false
,
expectedHTTPSFormattedURLString
:
"xyz.http.myservice:30563"
,
expectedIsHTTPSchemedURL
:
false
,
},
{
description
:
"https for http schemed with https option"
,
bareURLString
:
"http://192.168.99.100:30563"
,
https
:
true
,
description
:
"https for http schemed with https option"
,
bareURLString
:
"http://192.168.99.100:30563"
,
https
:
true
,
expectedHTTPSFormattedURLString
:
"https://192.168.99.100:30563"
,
expectedIsHTTPSchemedURL
:
true
,
},
{
description
:
"no https for non-http schemed with https option and http substring"
,
bareURLString
:
"xyz.http.myservice:30563"
,
https
:
true
,
description
:
"no https for non-http schemed with https option and http substring"
,
bareURLString
:
"xyz.http.myservice:30563"
,
https
:
true
,
expectedHTTPSFormattedURLString
:
"xyz.http.myservice:30563"
,
expectedIsHTTPSchemedURL
:
false
,
},
...
...
pkg/util/crypto.go
浏览文件 @
a358aff0
...
...
@@ -53,7 +53,7 @@ func GenerateCACert(certPath, keyPath string, name string) error {
KeyUsage
:
x509
.
KeyUsageKeyEncipherment
|
x509
.
KeyUsageDigitalSignature
|
x509
.
KeyUsageCertSign
,
ExtKeyUsage
:
[]
x509
.
ExtKeyUsage
{
x509
.
ExtKeyUsageClientAuth
,
x509
.
ExtKeyUsageServerAuth
},
BasicConstraintsValid
:
true
,
IsCA
:
true
,
IsCA
:
true
,
}
return
writeCertsAndKeys
(
&
template
,
certPath
,
priv
,
keyPath
,
&
template
,
priv
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录