add service traces
This commit is contained in:
@@ -10,7 +10,14 @@ type ServerRunOptions struct {
|
||||
|
||||
// istio pilot discovery service url
|
||||
IstioPilotServiceURL string
|
||||
OpenPitrixServer string
|
||||
|
||||
// jaeger query service url
|
||||
JaegerQueryServiceUrl string
|
||||
|
||||
// openpitrix api gateway service url
|
||||
OpenPitrixServer string
|
||||
|
||||
// openpitrix service token
|
||||
OpenPitrixProxyToken string
|
||||
}
|
||||
|
||||
@@ -19,6 +26,7 @@ func NewServerRunOptions() *ServerRunOptions {
|
||||
s := ServerRunOptions{
|
||||
GenericServerRunOptions: genericoptions.NewServerRunOptions(),
|
||||
IstioPilotServiceURL: "http://istio-pilot.istio-system.svc:8080/version",
|
||||
JaegerQueryServiceUrl: "http://jaeger-query.istio-system.svc:16686/jaeger",
|
||||
}
|
||||
|
||||
return &s
|
||||
@@ -29,4 +37,6 @@ func (s *ServerRunOptions) AddFlags(fs *pflag.FlagSet) {
|
||||
s.GenericServerRunOptions.AddFlags(fs)
|
||||
|
||||
fs.StringVar(&s.IstioPilotServiceURL, "istio-pilot-service-url", "http://istio-pilot.istio-system.svc:8080/version", "istio pilot discovery service url")
|
||||
fs.StringVar(&s.JaegerQueryServiceUrl, "jaeger-query-service-url", "http://jaeger-query.istio-system.svc:16686/jaeger", "jaeger query service url")
|
||||
|
||||
}
|
||||
|
||||
@@ -27,6 +27,7 @@ import (
|
||||
"github.com/spf13/pflag"
|
||||
"kubesphere.io/kubesphere/cmd/ks-apiserver/app/options"
|
||||
"kubesphere.io/kubesphere/pkg/apiserver/runtime"
|
||||
"kubesphere.io/kubesphere/pkg/apiserver/servicemesh/tracing"
|
||||
"kubesphere.io/kubesphere/pkg/filter"
|
||||
"kubesphere.io/kubesphere/pkg/informers"
|
||||
"kubesphere.io/kubesphere/pkg/models"
|
||||
@@ -79,7 +80,7 @@ func Run(s *options.ServerRunOptions) error {
|
||||
}
|
||||
|
||||
initializeESClientConfig()
|
||||
initializeKialiConfig(s)
|
||||
initializeServicemeshConfig(s)
|
||||
err = initializeDatabase()
|
||||
|
||||
if err != nil {
|
||||
@@ -109,10 +110,12 @@ func initializeDatabase() error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func initializeKialiConfig(s *options.ServerRunOptions) {
|
||||
func initializeServicemeshConfig(s *options.ServerRunOptions) {
|
||||
// Initialize kiali config
|
||||
config := kconfig.NewConfig()
|
||||
|
||||
tracing.JaegerQueryUrl = s.JaegerQueryServiceUrl
|
||||
|
||||
// Exclude system namespaces
|
||||
config.API.Namespaces.Exclude = []string{"istio-system", "kubesphere*", "kube*"}
|
||||
config.InCluster = true
|
||||
|
||||
Reference in New Issue
Block a user