Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
水淹萌龙
kubesphere
提交
01cc686c
K
kubesphere
项目概览
水淹萌龙
/
kubesphere
与 Fork 源项目一致
Fork自
KubeSphere / kubesphere
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
K
kubesphere
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
未验证
提交
01cc686c
编写于
11月 17, 2020
作者:
K
KubeSphere CI Bot
提交者:
GitHub
11月 17, 2020
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #3080 from zheng1/weave
Add param WeaveScopeHost
上级
343b2e60
c8f814ac
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
10 addition
and
0 deletion
+10
-0
pkg/apiserver/apiserver.go
pkg/apiserver/apiserver.go
+2
-0
pkg/apiserver/config/config_test.go
pkg/apiserver/config/config_test.go
+1
-0
pkg/kapis/network/v1alpha2/handler.go
pkg/kapis/network/v1alpha2/handler.go
+1
-0
pkg/simple/client/network/options.go
pkg/simple/client/network/options.go
+6
-0
未找到文件。
pkg/apiserver/apiserver.go
浏览文件 @
01cc686c
...
...
@@ -58,6 +58,7 @@ import (
devopsv1alpha3
"kubesphere.io/kubesphere/pkg/kapis/devops/v1alpha3"
iamapi
"kubesphere.io/kubesphere/pkg/kapis/iam/v1alpha2"
monitoringv1alpha3
"kubesphere.io/kubesphere/pkg/kapis/monitoring/v1alpha3"
networkv1alpha2
"kubesphere.io/kubesphere/pkg/kapis/network/v1alpha2"
notificationv1
"kubesphere.io/kubesphere/pkg/kapis/notification/v1"
"kubesphere.io/kubesphere/pkg/kapis/oauth"
openpitrixv1
"kubesphere.io/kubesphere/pkg/kapis/openpitrix/v1"
...
...
@@ -202,6 +203,7 @@ func (s *APIServer) installKubeSphereAPIs() {
im
.
NewLoginRecorder
(
s
.
KubernetesClient
.
KubeSphere
()),
s
.
Config
.
AuthenticationOptions
))
urlruntime
.
Must
(
servicemeshv1alpha2
.
AddToContainer
(
s
.
container
))
urlruntime
.
Must
(
networkv1alpha2
.
AddToContainer
(
s
.
container
,
s
.
Config
.
NetworkOptions
.
WeaveScopeHost
))
urlruntime
.
Must
(
devopsv1alpha2
.
AddToContainer
(
s
.
container
,
s
.
InformerFactory
.
KubeSphereSharedInformerFactory
(),
s
.
DevopsClient
,
...
...
pkg/apiserver/config/config_test.go
浏览文件 @
01cc686c
...
...
@@ -105,6 +105,7 @@ func newTestConfig() (*Config, error) {
NSNPOptions
:
network
.
NSNPOptions
{
AllowedIngressNamespaces
:
[]
string
{},
},
WeaveScopeHost
:
"weave-scope-app.weave"
,
},
MonitoringOptions
:
&
prometheus
.
Options
{
Endpoint
:
"http://prometheus.kubesphere-monitoring-system.svc"
,
...
...
pkg/kapis/network/v1alpha2/handler.go
浏览文件 @
01cc686c
...
...
@@ -31,6 +31,7 @@ import (
const
ScopeQueryUrl
=
"http://%s/api/topology/services"
type
handler
struct
{
// if weave scope installed in the cluster, it is maybe `weave-scope-app.weave`
weaveScopeHost
string
}
...
...
pkg/simple/client/network/options.go
浏览文件 @
01cc686c
...
...
@@ -18,6 +18,7 @@ package network
import
(
"github.com/spf13/pflag"
"kubesphere.io/kubesphere/pkg/simple/client/network/ippool"
)
...
...
@@ -30,6 +31,7 @@ type Options struct {
NSNPOptions
NSNPOptions
`json:"nsnpOptions,omitempty" yaml:"nsnpOptions,omitempty"`
EnableIPPool
bool
`json:"enableIPPool,omitempty" yaml:"enableIPPool"`
IPPoolOptions
ippool
.
Options
`json:"ippoolOptions,omitempty" yaml:"ippoolOptions,omitempty"`
WeaveScopeHost
string
`json:"weaveScopeHost,omitempty" yaml:"weaveScopeHost,omitempty"`
}
// NewNetworkOptions returns a `zero` instance
...
...
@@ -43,6 +45,7 @@ func NewNetworkOptions() *Options {
IPPoolOptions
:
ippool
.
Options
{
Calico
:
nil
,
},
WeaveScopeHost
:
""
,
}
}
...
...
@@ -56,6 +59,7 @@ func (s *Options) ApplyTo(options *Options) {
options
.
EnableIPPool
=
s
.
EnableIPPool
options
.
NSNPOptions
=
s
.
NSNPOptions
options
.
IPPoolOptions
=
s
.
IPPoolOptions
options
.
WeaveScopeHost
=
s
.
WeaveScopeHost
}
func
(
s
*
Options
)
AddFlags
(
fs
*
pflag
.
FlagSet
,
c
*
Options
)
{
...
...
@@ -63,4 +67,6 @@ func (s *Options) AddFlags(fs *pflag.FlagSet, c *Options) {
"This field instructs KubeSphere to enable network policy or not."
)
fs
.
BoolVar
(
&
s
.
EnableIPPool
,
"enable-ippool"
,
c
.
EnableIPPool
,
"This field instructs KubeSphere to enable ippool or not."
)
fs
.
StringVar
(
&
s
.
WeaveScopeHost
,
"weave-scope-host"
,
c
.
WeaveScopeHost
,
"Weave Scope service endpoint which build a topology API of the applications and the containers running on the hosts"
)
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录