2
Makefile
2
Makefile
@@ -75,7 +75,7 @@ docker-build: all
|
|||||||
|
|
||||||
# Run tests
|
# Run tests
|
||||||
test: generate fmt vet
|
test: generate fmt vet
|
||||||
export KUBEBUILDER_CONTROLPLANE_START_TIMEOUT=1m; go test ./pkg/... ./cmd/... -coverprofile cover.out
|
go test ./pkg/... ./cmd/... -coverprofile cover.out
|
||||||
|
|
||||||
.PHONY: clean
|
.PHONY: clean
|
||||||
clean:
|
clean:
|
||||||
|
|||||||
@@ -34,10 +34,8 @@ import (
|
|||||||
es "kubesphere.io/kubesphere/pkg/simple/client/elasticsearch"
|
es "kubesphere.io/kubesphere/pkg/simple/client/elasticsearch"
|
||||||
fb "kubesphere.io/kubesphere/pkg/simple/client/fluentbit"
|
fb "kubesphere.io/kubesphere/pkg/simple/client/fluentbit"
|
||||||
"kubesphere.io/kubesphere/pkg/simple/client/mysql"
|
"kubesphere.io/kubesphere/pkg/simple/client/mysql"
|
||||||
"kubesphere.io/kubesphere/pkg/simple/client/prometheus"
|
|
||||||
"log"
|
"log"
|
||||||
"net/http"
|
"net/http"
|
||||||
"net/url"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
var jsonIter = jsoniter.ConfigCompatibleWithStandardLibrary
|
var jsonIter = jsoniter.ConfigCompatibleWithStandardLibrary
|
||||||
@@ -103,20 +101,11 @@ func initializeKialiConfig(s *options.ServerRunOptions) {
|
|||||||
|
|
||||||
// Exclude system namespaces
|
// Exclude system namespaces
|
||||||
config.API.Namespaces.Exclude = []string{"istio-system", "kubesphere*", "kube*"}
|
config.API.Namespaces.Exclude = []string{"istio-system", "kubesphere*", "kube*"}
|
||||||
config.InCluster = false
|
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
|
||||||
|
|||||||
@@ -32,6 +32,7 @@ import (
|
|||||||
_ "kubesphere.io/kubesphere/pkg/apis/metrics/install"
|
_ "kubesphere.io/kubesphere/pkg/apis/metrics/install"
|
||||||
_ "kubesphere.io/kubesphere/pkg/apis/operations/install"
|
_ "kubesphere.io/kubesphere/pkg/apis/operations/install"
|
||||||
_ "kubesphere.io/kubesphere/pkg/apis/resources/install"
|
_ "kubesphere.io/kubesphere/pkg/apis/resources/install"
|
||||||
|
_ "kubesphere.io/kubesphere/pkg/apis/servicemesh/metrics/install"
|
||||||
)
|
)
|
||||||
|
|
||||||
var output string
|
var output string
|
||||||
|
|||||||
Reference in New Issue
Block a user