Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
KubeSphere
kubesphere
提交
87c71ed2
K
kubesphere
项目概览
KubeSphere
/
kubesphere
通知
143
Star
32
Fork
5
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
2
Wiki
分析
仓库
DevOps
项目成员
Pages
K
kubesphere
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
2
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
87c71ed2
编写于
3月 11, 2021
作者:
L
LiHui
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fix: handle openpititx config
Signed-off-by:
N
LiHui
<
andrewli@yunify.com
>
上级
01600081
变更
3
显示空白变更内容
内联
并排
Showing
3 changed file
with
7 addition
and
8 deletion
+7
-8
cmd/controller-manager/app/server.go
cmd/controller-manager/app/server.go
+1
-1
pkg/apiserver/config/config.go
pkg/apiserver/config/config.go
+5
-6
pkg/simple/client/openpitrix/options.go
pkg/simple/client/openpitrix/options.go
+1
-1
未找到文件。
cmd/controller-manager/app/server.go
浏览文件 @
87c71ed2
...
@@ -228,7 +228,7 @@ func run(s *options.KubeSphereControllerManagerOptions, stopCh <-chan struct{})
...
@@ -228,7 +228,7 @@ func run(s *options.KubeSphereControllerManagerOptions, stopCh <-chan struct{})
klog
.
Fatal
(
"Unable to create helm category controller"
)
klog
.
Fatal
(
"Unable to create helm category controller"
)
}
}
if
!
s
.
OpenPitrixOptions
.
IsEmpty
()
{
if
!
s
.
OpenPitrixOptions
.
AppStoreConf
IsEmpty
()
{
storageClient
,
err
:=
s3
.
NewS3Client
(
s
.
OpenPitrixOptions
.
S3Options
)
storageClient
,
err
:=
s3
.
NewS3Client
(
s
.
OpenPitrixOptions
.
S3Options
)
if
err
!=
nil
{
if
err
!=
nil
{
klog
.
Fatalf
(
"failed to connect to s3, please check openpitrix s3 service status, error: %v"
,
err
)
klog
.
Fatalf
(
"failed to connect to s3, please check openpitrix s3 service status, error: %v"
,
err
)
...
...
pkg/apiserver/config/config.go
浏览文件 @
87c71ed2
...
@@ -200,11 +200,14 @@ func (conf *Config) ToMap() map[string]bool {
...
@@ -200,11 +200,14 @@ func (conf *Config) ToMap() map[string]bool {
}
}
if
name
==
"openpitrix"
{
if
name
==
"openpitrix"
{
if
conf
.
OpenPitrixOptions
.
IsEmpty
()
{
// openpitrix is always true
result
[
name
]
=
true
if
conf
.
OpenPitrixOptions
==
nil
{
result
[
"openpitrix.appstore"
]
=
false
result
[
"openpitrix.appstore"
]
=
false
}
else
{
}
else
{
result
[
"openpitrix.appstore"
]
=
true
result
[
"openpitrix.appstore"
]
=
conf
.
OpenPitrixOptions
.
AppStoreConfIsEmpty
()
}
}
continue
}
}
if
c
.
Field
(
i
)
.
IsNil
()
{
if
c
.
Field
(
i
)
.
IsNil
()
{
...
@@ -240,10 +243,6 @@ func (conf *Config) stripEmptyOptions() {
...
@@ -240,10 +243,6 @@ func (conf *Config) stripEmptyOptions() {
conf
.
LdapOptions
=
nil
conf
.
LdapOptions
=
nil
}
}
if
conf
.
OpenPitrixOptions
!=
nil
&&
conf
.
OpenPitrixOptions
.
IsEmpty
()
{
conf
.
OpenPitrixOptions
=
nil
}
if
conf
.
NetworkOptions
!=
nil
&&
conf
.
NetworkOptions
.
IsEmpty
()
{
if
conf
.
NetworkOptions
!=
nil
&&
conf
.
NetworkOptions
.
IsEmpty
()
{
conf
.
NetworkOptions
=
nil
conf
.
NetworkOptions
=
nil
}
}
...
...
pkg/simple/client/openpitrix/options.go
浏览文件 @
87c71ed2
...
@@ -39,7 +39,7 @@ func (s *Options) Validate() []error {
...
@@ -39,7 +39,7 @@ func (s *Options) Validate() []error {
return
errors
return
errors
}
}
func
(
s
*
Options
)
IsEmpty
()
bool
{
func
(
s
*
Options
)
AppStoreConf
IsEmpty
()
bool
{
return
s
.
S3Options
==
nil
||
s
.
S3Options
.
Endpoint
==
""
return
s
.
S3Options
==
nil
||
s
.
S3Options
.
Endpoint
==
""
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录