diff --git a/apm-webapp/src/main/java/org/apache/skywalking/oap/server/webapp/ApplicationStartUp.java b/apm-webapp/src/main/java/org/apache/skywalking/oap/server/webapp/ApplicationStartUp.java index bbc5d4a07b24..06bfae35c2f0 100644 --- a/apm-webapp/src/main/java/org/apache/skywalking/oap/server/webapp/ApplicationStartUp.java +++ b/apm-webapp/src/main/java/org/apache/skywalking/oap/server/webapp/ApplicationStartUp.java @@ -62,15 +62,16 @@ public static void main(String[] args) throws Exception { .of(ApplicationStartUp.class.getClassLoader(), "/zipkin-lens/index.html") .asService(); - final ZipkinProxyService zipkin = new ZipkinProxyService(configuration.zipkinServices()); + final var zipkin = new ZipkinProxyService(configuration.zipkinServices()); + final var oap = new OapProxyService(oapServices); Server .builder() .port(port, SessionProtocol.HTTP) - .service("/graphql", new OapProxyService(oapServices)) - .service("/debugging/config/dump", new OapProxyService(oapServices)) - .service("/status/config/ttl", new OapProxyService(oapServices)) - .service("/status/cluster/nodes", new OapProxyService(oapServices)) + .service("/graphql", oap) + .service("/debugging/config/dump", oap) + .service("/status/config/ttl", oap) + .service("/status/cluster/nodes", oap) .service("/internal/l7check", HealthCheckService.of()) .service("/zipkin/config.json", zipkin) .serviceUnder("/zipkin/api", zipkin) diff --git a/apm-webapp/src/main/java/org/apache/skywalking/oap/server/webapp/OapProxyService.java b/apm-webapp/src/main/java/org/apache/skywalking/oap/server/webapp/OapProxyService.java index 560ca61ccfab..5a53bfc1a3d5 100644 --- a/apm-webapp/src/main/java/org/apache/skywalking/oap/server/webapp/OapProxyService.java +++ b/apm-webapp/src/main/java/org/apache/skywalking/oap/server/webapp/OapProxyService.java @@ -67,7 +67,7 @@ private static WebClient newLoadBalancingClient(EndpointGroup oapGroup) { healthCheckedGroup.whenReady().get(); return WebClient - .builder(SessionProtocol.HTTP, oapGroup) + .builder(SessionProtocol.HTTP, healthCheckedGroup) .decorator(LoggingClient.newDecorator()) .build(); } diff --git a/docs/en/changes/changes.md b/docs/en/changes/changes.md index 14042e1ddd75..3ad9115575a4 100644 --- a/docs/en/changes/changes.md +++ b/docs/en/changes/changes.md @@ -112,6 +112,7 @@ * fix: optimize appearing the wrong prompt by pop-up for the HTTP environments in copy function. * refactor the configuration view and implement the optional config for displaying timestamp in Log widget. * test: implement unit tests for hooks and refactor some types. +* fix: share OAP proxy servies for different endpoins and use health checked endpoints group. #### Documentation diff --git a/test/e2e-v2/cases/cilium/e2e.yaml b/test/e2e-v2/cases/cilium/e2e.yaml index 26cc434bc6af..9c05a267d7b0 100644 --- a/test/e2e-v2/cases/cilium/e2e.yaml +++ b/test/e2e-v2/cases/cilium/e2e.yaml @@ -61,6 +61,7 @@ setup: --set oap.image.tag=latest \ --set oap.image.repository=skywalking/oap \ --set oap.storageType=elasticsearch \ + --set oap.env.SW_HEALTH_CHECKER=default \ -f test/e2e-v2/cases/cilium/values.yaml wait: - namespace: kube-system diff --git a/test/e2e-v2/cases/istio/als/e2e.yaml b/test/e2e-v2/cases/istio/als/e2e.yaml index 0aadf6009ba9..6dd855eb8766 100644 --- a/test/e2e-v2/cases/istio/als/e2e.yaml +++ b/test/e2e-v2/cases/istio/als/e2e.yaml @@ -56,6 +56,7 @@ setup: --set oap.env.SW_ENVOY_METRIC_ALS_HTTP_ANALYSIS=$ALS_ANALYZER \ --set oap.env.SW_ENVOY_METRIC_ALS_TCP_ANALYSIS=$ALS_ANALYZER \ --set oap.env.K8S_SERVICE_NAME_RULE='e2e::${service.metadata.name}' \ + --set oap.env.SW_HEALTH_CHECKER=default \ --set oap.envoy.als.enabled=true \ --set oap.replicas=1 \ --set ui.image.repository=skywalking/ui \ diff --git a/test/e2e-v2/cases/istio/ambient-als/e2e.yaml b/test/e2e-v2/cases/istio/ambient-als/e2e.yaml index 8017f29b44e4..d0c95405e13f 100644 --- a/test/e2e-v2/cases/istio/ambient-als/e2e.yaml +++ b/test/e2e-v2/cases/istio/ambient-als/e2e.yaml @@ -64,6 +64,7 @@ setup: --set oap.env.SW_ENVOY_METRIC_ALS_HTTP_ANALYSIS=$ALS_ANALYZER \ --set oap.env.SW_ENVOY_METRIC_ALS_TCP_ANALYSIS=$ALS_ANALYZER \ --set oap.env.K8S_SERVICE_NAME_RULE='e2e::${service.metadata.name}' \ + --set oap.env.SW_HEALTH_CHECKER=default \ --set oap.envoy.als.enabled=true \ --set oap.replicas=1 \ --set ui.image.repository=skywalking/ui \ diff --git a/test/e2e-v2/cases/istio/metrics/e2e.yaml b/test/e2e-v2/cases/istio/metrics/e2e.yaml index a58434a208a6..f9e786b84612 100644 --- a/test/e2e-v2/cases/istio/metrics/e2e.yaml +++ b/test/e2e-v2/cases/istio/metrics/e2e.yaml @@ -66,6 +66,7 @@ setup: --set oap.env.SW_ENVOY_METRIC_ALS_HTTP_ANALYSIS=$ALS_ANALYZER \ --set oap.env.SW_ENVOY_METRIC_ALS_TCP_ANALYSIS=$ALS_ANALYZER \ --set oap.env.K8S_SERVICE_NAME_RULE='e2e::${service.metadata.name}' \ + --set oap.env.SW_HEALTH_CHECKER=default \ --set oap.envoy.als.enabled=true \ --set oap.replicas=1 \ --set ui.image.repository=skywalking/ui \ diff --git a/test/e2e-v2/cases/profiling/ebpf/access_log/banyandb/e2e.yaml b/test/e2e-v2/cases/profiling/ebpf/access_log/banyandb/e2e.yaml index 1baef8dd8343..a4d7e8dee990 100644 --- a/test/e2e-v2/cases/profiling/ebpf/access_log/banyandb/e2e.yaml +++ b/test/e2e-v2/cases/profiling/ebpf/access_log/banyandb/e2e.yaml @@ -57,6 +57,7 @@ setup: --set oap.image.tag=latest \ --set oap.image.repository=skywalking/oap \ --set oap.storageType=banyandb \ + --set oap.env.SW_HEALTH_CHECKER=default \ -f test/e2e-v2/cases/profiling/ebpf/kubernetes-values.yaml wait: - namespace: istio-system diff --git a/test/e2e-v2/cases/profiling/ebpf/access_log/es/e2e.yaml b/test/e2e-v2/cases/profiling/ebpf/access_log/es/e2e.yaml index a331c98ad1af..cc3751650d54 100644 --- a/test/e2e-v2/cases/profiling/ebpf/access_log/es/e2e.yaml +++ b/test/e2e-v2/cases/profiling/ebpf/access_log/es/e2e.yaml @@ -55,6 +55,7 @@ setup: --set oap.image.tag=latest \ --set oap.image.repository=skywalking/oap \ --set oap.storageType=elasticsearch \ + --set oap.env.SW_HEALTH_CHECKER=default \ -f test/e2e-v2/cases/profiling/ebpf/kubernetes-values.yaml wait: - namespace: istio-system @@ -82,4 +83,4 @@ verify: interval: 10s cases: - includes: - - ../accesslog-cases.yaml \ No newline at end of file + - ../accesslog-cases.yaml diff --git a/test/e2e-v2/cases/profiling/ebpf/access_log/es/es-sharding/e2e.yaml b/test/e2e-v2/cases/profiling/ebpf/access_log/es/es-sharding/e2e.yaml index 9a01cfc5550b..32a3d8738b58 100644 --- a/test/e2e-v2/cases/profiling/ebpf/access_log/es/es-sharding/e2e.yaml +++ b/test/e2e-v2/cases/profiling/ebpf/access_log/es/es-sharding/e2e.yaml @@ -56,6 +56,7 @@ setup: --set oap.image.repository=skywalking/oap \ --set oap.storageType=elasticsearch \ --set oap.env.SW_STORAGE_ES_LOGIC_SHARDING=true \ + --set oap.env.SW_HEALTH_CHECKER=default \ -f test/e2e-v2/cases/profiling/ebpf/kubernetes-values.yaml wait: - namespace: istio-system @@ -83,4 +84,4 @@ verify: interval: 10s cases: - includes: - - ../../accesslog-cases.yaml \ No newline at end of file + - ../../accesslog-cases.yaml diff --git a/test/e2e-v2/cases/profiling/ebpf/continuous/banyandb/e2e.yaml b/test/e2e-v2/cases/profiling/ebpf/continuous/banyandb/e2e.yaml index 6be954ee94ee..8742c915e4b2 100644 --- a/test/e2e-v2/cases/profiling/ebpf/continuous/banyandb/e2e.yaml +++ b/test/e2e-v2/cases/profiling/ebpf/continuous/banyandb/e2e.yaml @@ -58,6 +58,7 @@ setup: --set oap.image.tag=latest \ --set oap.image.repository=skywalking/oap \ --set oap.storageType=banyandb \ + --set oap.env.SW_HEALTH_CHECKER=default \ -f test/e2e-v2/cases/profiling/ebpf/kubernetes-values.yaml wait: - namespace: istio-system @@ -82,4 +83,4 @@ verify: interval: 10s cases: - includes: - - ../profiling-cases.yaml \ No newline at end of file + - ../profiling-cases.yaml diff --git a/test/e2e-v2/cases/profiling/ebpf/continuous/es/e2e.yaml b/test/e2e-v2/cases/profiling/ebpf/continuous/es/e2e.yaml index fe16567f3012..6baf91f52577 100644 --- a/test/e2e-v2/cases/profiling/ebpf/continuous/es/e2e.yaml +++ b/test/e2e-v2/cases/profiling/ebpf/continuous/es/e2e.yaml @@ -56,6 +56,7 @@ setup: --set oap.image.tag=latest \ --set oap.image.repository=skywalking/oap \ --set oap.storageType=elasticsearch \ + --set oap.env.SW_HEALTH_CHECKER=default \ -f test/e2e-v2/cases/profiling/ebpf/kubernetes-values.yaml wait: - namespace: istio-system @@ -80,4 +81,4 @@ verify: interval: 10s cases: - includes: - - ../profiling-cases.yaml \ No newline at end of file + - ../profiling-cases.yaml diff --git a/test/e2e-v2/cases/profiling/ebpf/continuous/es/es-sharding/e2e.yaml b/test/e2e-v2/cases/profiling/ebpf/continuous/es/es-sharding/e2e.yaml index fa3ae952aa06..6aa9e6e5242c 100644 --- a/test/e2e-v2/cases/profiling/ebpf/continuous/es/es-sharding/e2e.yaml +++ b/test/e2e-v2/cases/profiling/ebpf/continuous/es/es-sharding/e2e.yaml @@ -57,6 +57,7 @@ setup: --set oap.image.repository=skywalking/oap \ --set oap.storageType=elasticsearch \ --set oap.env.SW_STORAGE_ES_LOGIC_SHARDING=true \ + --set oap.env.SW_HEALTH_CHECKER=default \ -f test/e2e-v2/cases/profiling/ebpf/kubernetes-values.yaml wait: - namespace: istio-system @@ -81,4 +82,4 @@ verify: interval: 10s cases: - includes: - - ../../profiling-cases.yaml \ No newline at end of file + - ../../profiling-cases.yaml diff --git a/test/e2e-v2/cases/profiling/ebpf/continuous/postgres/e2e.yaml b/test/e2e-v2/cases/profiling/ebpf/continuous/postgres/e2e.yaml index 6be954ee94ee..8742c915e4b2 100644 --- a/test/e2e-v2/cases/profiling/ebpf/continuous/postgres/e2e.yaml +++ b/test/e2e-v2/cases/profiling/ebpf/continuous/postgres/e2e.yaml @@ -58,6 +58,7 @@ setup: --set oap.image.tag=latest \ --set oap.image.repository=skywalking/oap \ --set oap.storageType=banyandb \ + --set oap.env.SW_HEALTH_CHECKER=default \ -f test/e2e-v2/cases/profiling/ebpf/kubernetes-values.yaml wait: - namespace: istio-system @@ -82,4 +83,4 @@ verify: interval: 10s cases: - includes: - - ../profiling-cases.yaml \ No newline at end of file + - ../profiling-cases.yaml diff --git a/test/e2e-v2/cases/profiling/ebpf/network/banyandb/e2e.yaml b/test/e2e-v2/cases/profiling/ebpf/network/banyandb/e2e.yaml index b9e6db859cb8..7432c1a38ed5 100644 --- a/test/e2e-v2/cases/profiling/ebpf/network/banyandb/e2e.yaml +++ b/test/e2e-v2/cases/profiling/ebpf/network/banyandb/e2e.yaml @@ -61,6 +61,7 @@ setup: --set oap.image.tag=latest \ --set oap.image.repository=skywalking/oap \ --set oap.storageType=banyandb \ + --set oap.env.SW_HEALTH_CHECKER=default \ -f test/e2e-v2/cases/profiling/ebpf/network/kubernetes-values.yaml wait: - namespace: istio-system @@ -92,4 +93,4 @@ verify: interval: 10s cases: - includes: - - ../network-cases.yaml \ No newline at end of file + - ../network-cases.yaml diff --git a/test/e2e-v2/cases/profiling/ebpf/network/es/e2e.yaml b/test/e2e-v2/cases/profiling/ebpf/network/es/e2e.yaml index 20785122665a..1d7f85a49227 100644 --- a/test/e2e-v2/cases/profiling/ebpf/network/es/e2e.yaml +++ b/test/e2e-v2/cases/profiling/ebpf/network/es/e2e.yaml @@ -60,6 +60,7 @@ setup: --set oap.image.tag=latest \ --set oap.image.repository=skywalking/oap \ --set oap.storageType=elasticsearch \ + --set oap.env.SW_HEALTH_CHECKER=default \ -f test/e2e-v2/cases/profiling/ebpf/network/kubernetes-values.yaml wait: - namespace: istio-system @@ -91,4 +92,4 @@ verify: interval: 10s cases: - includes: - - ../network-cases.yaml \ No newline at end of file + - ../network-cases.yaml diff --git a/test/e2e-v2/cases/profiling/ebpf/network/es/es-sharding/e2e.yaml b/test/e2e-v2/cases/profiling/ebpf/network/es/es-sharding/e2e.yaml index 6ac6d5793f9a..51425ac79f7a 100644 --- a/test/e2e-v2/cases/profiling/ebpf/network/es/es-sharding/e2e.yaml +++ b/test/e2e-v2/cases/profiling/ebpf/network/es/es-sharding/e2e.yaml @@ -60,6 +60,7 @@ setup: --set oap.image.repository=skywalking/oap \ --set oap.storageType=elasticsearch \ --set oap.env.SW_STORAGE_ES_LOGIC_SHARDING=true \ + --set oap.env.SW_HEALTH_CHECKER=default \ -f test/e2e-v2/cases/profiling/ebpf/network/kubernetes-values.yaml wait: - namespace: istio-system @@ -91,4 +92,4 @@ verify: interval: 10s cases: - includes: - - ../../network-cases.yaml \ No newline at end of file + - ../../network-cases.yaml diff --git a/test/e2e-v2/cases/profiling/ebpf/offcpu/e2e.yaml b/test/e2e-v2/cases/profiling/ebpf/offcpu/e2e.yaml index 9ade36c8ce33..c476fe43c587 100644 --- a/test/e2e-v2/cases/profiling/ebpf/offcpu/e2e.yaml +++ b/test/e2e-v2/cases/profiling/ebpf/offcpu/e2e.yaml @@ -58,6 +58,7 @@ setup: --set oap.image.tag=latest \ --set oap.image.repository=skywalking/oap \ --set oap.storageType=banyandb \ + --set oap.env.SW_HEALTH_CHECKER=default \ -f test/e2e-v2/cases/profiling/ebpf/kubernetes-values.yaml wait: - namespace: istio-system @@ -113,4 +114,4 @@ verify: start=$(swctl --base-url=http://${service_skywalking_ui_host}:${service_skywalking_ui_80}/graphql --display yaml profiling ebpf schedules --task-id=$taskid | yq e '.[0].starttime' -) end=$(swctl --base-url=http://${service_skywalking_ui_host}:${service_skywalking_ui_80}/graphql --display yaml profiling ebpf schedules --task-id=$taskid | yq e '.[0].endtime' -) swctl --base-url=http://${service_skywalking_ui_host}:${service_skywalking_ui_80}/graphql --display yaml profiling ebpf analysis --schedule-id=$scheduleid --time-ranges=$start-$end --aggregate=DURATION - expected: expected/profiling-analysis.yml \ No newline at end of file + expected: expected/profiling-analysis.yml diff --git a/test/e2e-v2/cases/profiling/ebpf/oncpu/banyandb/e2e.yaml b/test/e2e-v2/cases/profiling/ebpf/oncpu/banyandb/e2e.yaml index 451377045a34..5ab6c5d9f06a 100644 --- a/test/e2e-v2/cases/profiling/ebpf/oncpu/banyandb/e2e.yaml +++ b/test/e2e-v2/cases/profiling/ebpf/oncpu/banyandb/e2e.yaml @@ -58,6 +58,7 @@ setup: --set oap.image.tag=latest \ --set oap.image.repository=skywalking/oap \ --set oap.storageType=banyandb \ + --set oap.env.SW_HEALTH_CHECKER=default \ -f test/e2e-v2/cases/profiling/ebpf/kubernetes-values.yaml wait: - namespace: istio-system @@ -82,4 +83,4 @@ verify: interval: 10s cases: - includes: - - ../profiling-cases.yaml \ No newline at end of file + - ../profiling-cases.yaml diff --git a/test/e2e-v2/cases/profiling/ebpf/oncpu/es/e2e.yaml b/test/e2e-v2/cases/profiling/ebpf/oncpu/es/e2e.yaml index 7a788f7f244b..9ccf6e8c55ad 100644 --- a/test/e2e-v2/cases/profiling/ebpf/oncpu/es/e2e.yaml +++ b/test/e2e-v2/cases/profiling/ebpf/oncpu/es/e2e.yaml @@ -56,6 +56,7 @@ setup: --set oap.image.tag=latest \ --set oap.image.repository=skywalking/oap \ --set oap.storageType=elasticsearch \ + --set oap.env.SW_HEALTH_CHECKER=default \ -f test/e2e-v2/cases/profiling/ebpf/kubernetes-values.yaml wait: - namespace: istio-system @@ -80,4 +81,4 @@ verify: interval: 10s cases: - includes: - - ../profiling-cases.yaml \ No newline at end of file + - ../profiling-cases.yaml diff --git a/test/e2e-v2/cases/profiling/ebpf/oncpu/es/es-sharding/e2e.yaml b/test/e2e-v2/cases/profiling/ebpf/oncpu/es/es-sharding/e2e.yaml index 2e94f069cc15..3013c54c43ec 100644 --- a/test/e2e-v2/cases/profiling/ebpf/oncpu/es/es-sharding/e2e.yaml +++ b/test/e2e-v2/cases/profiling/ebpf/oncpu/es/es-sharding/e2e.yaml @@ -57,6 +57,7 @@ setup: --set oap.image.repository=skywalking/oap \ --set oap.storageType=elasticsearch \ --set oap.env.SW_STORAGE_ES_LOGIC_SHARDING=true \ + --set oap.env.SW_HEALTH_CHECKER=default \ -f test/e2e-v2/cases/profiling/ebpf/kubernetes-values.yaml wait: - namespace: istio-system @@ -81,4 +82,4 @@ verify: interval: 10s cases: - includes: - - ../../profiling-cases.yaml \ No newline at end of file + - ../../profiling-cases.yaml diff --git a/test/e2e-v2/cases/rover/process/istio/e2e.yaml b/test/e2e-v2/cases/rover/process/istio/e2e.yaml index 628022789dd5..52949e06e83c 100644 --- a/test/e2e-v2/cases/rover/process/istio/e2e.yaml +++ b/test/e2e-v2/cases/rover/process/istio/e2e.yaml @@ -59,6 +59,7 @@ setup: --set oap.image.tag=latest \ --set oap.image.repository=skywalking/oap \ --set oap.storageType=elasticsearch \ + --set oap.env.SW_HEALTH_CHECKER=default \ -f test/e2e-v2/cases/rover/process/istio/values.yaml wait: - namespace: istio-system diff --git a/test/e2e-v2/script/docker-compose/base-compose.yml b/test/e2e-v2/script/docker-compose/base-compose.yml index 8516d5a8535d..ceb62bae9568 100644 --- a/test/e2e-v2/script/docker-compose/base-compose.yml +++ b/test/e2e-v2/script/docker-compose/base-compose.yml @@ -29,6 +29,7 @@ services: - ./../prepare/setup-oap/download-mysql.sh:/download-mysql.sh - ./../prepare/setup-oap/log4j2.xml:/skywalking/config/log4j2.xml environment: + SW_HEALTH_CHECKER: default SW_CLUSTER_ZK_HOST_PORT: zk:2181 SW_STORAGE_ES_CLUSTER_NODES: es:9200 SW_JDBC_URL: jdbc:mysql://mysql:3306/swtest?allowMultiQueries=true