未验证 提交 c0ebf8c4 编写于 作者: Z zryfish 提交者: GitHub

Merge pull request #301 from zryfish/point_p8s_to_istio_system

use istio p8s
...@@ -29,10 +29,8 @@ import ( ...@@ -29,10 +29,8 @@ import (
"kubesphere.io/kubesphere/pkg/filter" "kubesphere.io/kubesphere/pkg/filter"
"kubesphere.io/kubesphere/pkg/informers" "kubesphere.io/kubesphere/pkg/informers"
"kubesphere.io/kubesphere/pkg/signals" "kubesphere.io/kubesphere/pkg/signals"
"kubesphere.io/kubesphere/pkg/simple/client/prometheus"
"log" "log"
"net/http" "net/http"
"net/url"
) )
func NewAPIServerCommand() *cobra.Command { func NewAPIServerCommand() *cobra.Command {
...@@ -98,17 +96,8 @@ func initializeKialiConfig(s *options.ServerRunOptions) { ...@@ -98,17 +96,8 @@ func initializeKialiConfig(s *options.ServerRunOptions) {
config.InCluster = true config.InCluster = true
// Set default prometheus service url // Set default prometheus service url
config.ExternalServices.PrometheusServiceURL = "http://prometheus.kubesphere-monitoring-system.svc:9090" // TODO: use kubesphere builtin p8s instead of istio p8s
config.ExternalServices.PrometheusServiceURL = "http://prometheus.istio-system.svc.cluster.local:9090"
// ugly hack to get prometheus service url
if pflag.Parsed() && pflag.Lookup("prometheus-endpoint") != nil {
// Set prometheus
endpoint, err := url.Parse(prometheus.PrometheusAPIEndpoint)
if err != nil {
config.ExternalServices.PrometheusServiceURL = endpoint.Path
}
}
config.ExternalServices.PrometheusCustomMetricsURL = config.ExternalServices.PrometheusServiceURL config.ExternalServices.PrometheusCustomMetricsURL = config.ExternalServices.PrometheusServiceURL
// Set istio pilot discovery service url // Set istio pilot discovery service url
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册