You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by ke...@apache.org on 2024/01/18 01:55:10 UTC
(skywalking-showcase) branch endpointmodel created (now 1a63afd)
This is an automated email from the ASF dual-hosted git repository.
kezhenxu94 pushed a change to branch endpointmodel
in repository https://gitbox.apache.org/repos/asf/skywalking-showcase.git
at 1a63afd Add R3 to showcase
This branch includes the following new commits:
new 1a63afd Add R3 to showcase
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
(skywalking-showcase) 01/01: Add R3 to showcase
Posted by ke...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
kezhenxu94 pushed a commit to branch endpointmodel
in repository https://gitbox.apache.org/repos/asf/skywalking-showcase.git
commit 1a63afd61bf8303366673135b3de6adf877fd5f0
Author: kezhenxu94 <ke...@apache.org>
AuthorDate: Thu Jan 18 09:54:52 2024 +0800
Add R3 to showcase
---
Makefile.in | 3 +
deploy/platform/kubernetes/Makefile | 9 ++-
deploy/platform/kubernetes/Makefile.in | 2 +-
.../kubernetes/templates/feature-r3/resources.yaml | 79 ++++++++++++++++++++++
deploy/platform/kubernetes/values.yaml | 8 +++
docs/readme.md | 1 +
6 files changed, 100 insertions(+), 2 deletions(-)
diff --git a/Makefile.in b/Makefile.in
index c150aef..00516bd 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -56,5 +56,8 @@ GRAFANA_IMAGE ?= grafana/grafana:9.5.2
OTEL_COLLECTOR_IMAGE ?= otel/opentelemetry-collector
OTEL_COLLECTOR_IMAGE_TAG ?= 0.72.0
+SW_R3_IMAGE ?= ghcr.io/skyapm/r3
+SW_R3_IMAGE_TAG ?= 0.1.0
+
# ALL variables should be listed above ^^
EXPORTED_VARS := $(filter-out <%,$(.VARIABLES))
diff --git a/deploy/platform/kubernetes/Makefile b/deploy/platform/kubernetes/Makefile
index 13f071f..797d08d 100644
--- a/deploy/platform/kubernetes/Makefile
+++ b/deploy/platform/kubernetes/Makefile
@@ -39,6 +39,7 @@ HELM_OPTIONS := $(HELM_OPTIONS) --set features.javaAgentInjector.agentImage=$(SW
HELM_OPTIONS := $(HELM_OPTIONS) --set features.rover.image=$(SW_ROVER_IMAGE)
HELM_OPTIONS := $(HELM_OPTIONS) --set features.grafana.image=$(GRAFANA_IMAGE)
HELM_OPTIONS := $(HELM_OPTIONS) --set skywalking.grafana.plugin.version=$(SW_GRAFANA_PLUGIN_VERSION)
+HELM_OPTIONS := $(HELM_OPTIONS) --set features.r3.image=$(SW_R3_IMAGE):$(SW_R3_IMAGE_TAG)
ifeq ($(DEBUG),true)
HELM_OPTIONS := $(HELM_OPTIONS) --dry-run --debug
@@ -99,7 +100,7 @@ feature-istiod-monitor:
.PHONY: feature-als
feature-als:
$(eval HELM_OPTIONS := $(HELM_OPTIONS) --set features.als.enabled=true)
- $(eval HELM_OPTIONS := $(HELM_OPTIONS) --set istio.enabled=true)
+ $(eval HELM_OPTIONS := $(HELM_OPTIONS) --set istio.enabled=true --set istiod.global.istioNamespace=$(NAMESPACE) --set base.global.istioNamespace=$(NAMESPACE))
$(eval HELM_OPTIONS := $(HELM_OPTIONS) --set istiod.meshConfig.defaultConfig.tracing.zipkin.address=$(RELEASE)-oap.$(NAMESPACE).svc:9411)
$(eval HELM_OPTIONS := $(HELM_OPTIONS) --set istiod.meshConfig.defaultConfig.envoyMetricsService.address=$(BACKEND_SERVICE))
$(eval HELM_OPTIONS := $(HELM_OPTIONS) --set istiod.meshConfig.defaultConfig.envoyAccessLogService.address=$(BACKEND_SERVICE))
@@ -171,6 +172,12 @@ feature-grafana:
feature-mesh-with-agent:
$(eval HELM_OPTIONS := $(HELM_OPTIONS) --set features.meshWithAgent.enabled=true)
+.PHONY: feature-r3
+feature-r3:
+ $(eval HELM_OPTIONS := $(HELM_OPTIONS) --set features.r3.enabled=true)
+ $(eval HELM_OPTIONS := $(HELM_OPTIONS) --set skywalking.oap.env.SW_AI_PIPELINE_URI_RECOGNITION_SERVER_ADDR=r3)
+
+
.PHONY: deploy
deploy: $(features)
helm dep up .
diff --git a/deploy/platform/kubernetes/Makefile.in b/deploy/platform/kubernetes/Makefile.in
index e126b9e..5eb6bbe 100644
--- a/deploy/platform/kubernetes/Makefile.in
+++ b/deploy/platform/kubernetes/Makefile.in
@@ -23,4 +23,4 @@ SAMPLE_SERVICES_NAMESPACE ?= sample-services
RELEASE ?= demo
AGENTLESS ?= false
-FEATURE_FLAGS ?= java-agent-injector,cluster,elasticsearch,kubernetes-monitor,so11y,vm-monitor,als,event,istiod-monitor,satellite,rover,trace-profiling,mysql-monitor,postgresql-monitor,nginx-monitor,apisix-monitor,grafana,elasticsearch-monitor,rabbitmq-monitor,mongodb-monitor
+FEATURE_FLAGS ?= java-agent-injector,cluster,elasticsearch,kubernetes-monitor,so11y,vm-monitor,als,event,istiod-monitor,satellite,rover,trace-profiling,mysql-monitor,postgresql-monitor,nginx-monitor,apisix-monitor,grafana,elasticsearch-monitor,rabbitmq-monitor,mongodb-monitor,r3
diff --git a/deploy/platform/kubernetes/templates/feature-r3/resources.yaml b/deploy/platform/kubernetes/templates/feature-r3/resources.yaml
new file mode 100644
index 0000000..388ece8
--- /dev/null
+++ b/deploy/platform/kubernetes/templates/feature-r3/resources.yaml
@@ -0,0 +1,79 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+{{- if .Values.features.r3.enabled }}
+apiVersion: v1
+kind: Service
+metadata:
+ name: r3
+spec:
+ selector:
+ app: r3
+ ports:
+ - protocol: TCP
+ port: 17128
+ name: r3-port
+
+---
+apiVersion: apps/v1
+kind: Deployment
+metadata:
+ name: r3-deployment
+ labels:
+ app: r3
+spec:
+ replicas: 1
+ selector:
+ matchLabels:
+ app: r3
+ template:
+ metadata:
+ labels:
+ app: r3
+ annotations:
+ sidecar.istio.io/inject: "false"
+ spec:
+ containers:
+ - name: r3
+ image: {{ .Values.features.r3.image }}
+ ports:
+ - containerPort: 17128
+
+---
+apiVersion: batch/v1
+kind: CronJob
+metadata:
+ name: r3-load
+ namespace: {{ .Values.sampleServices.namespace }}
+ labels:
+ app: r3-load
+spec:
+ schedule: "0,10,20,30,40,50 * * * *"
+ successfulJobsHistoryLimit: 1
+ failedJobsHistoryLimit: 1
+ jobTemplate:
+ spec:
+ template:
+ spec:
+ shareProcessNamespace: true
+ containers:
+ - name: r3-load
+ image: curlimages/curl
+ command: ["/bin/sh"]
+ args: ["-c", "for i in $(seq 1 20); do curl http://rating/songs/$i/reviews/$((i+1)); sleep 1; done; pkill -f /usr/local/bin/pilot-agent"]
+ restartPolicy: Never
+{{- end }}
diff --git a/deploy/platform/kubernetes/values.yaml b/deploy/platform/kubernetes/values.yaml
index f9fa608..dac22a7 100644
--- a/deploy/platform/kubernetes/values.yaml
+++ b/deploy/platform/kubernetes/values.yaml
@@ -55,6 +55,10 @@ skywalking:
SW_STORAGE_ES_SUPER_DATASET_INDEX_SHARDS_FACTOR: "2"
SW_RECEIVER_ZIPKIN: default
SW_QUERY_ZIPKIN: default
+ # @feature: r3; some basic settings for R3
+ SW_CORE_ENABLE_ENDPOINT_NAME_GROUPING_BY_OPENAPI: "false"
+ SW_CORE_MAX_HTTP_URIS_NUMBER_PER_SVR: "3000"
+ SW_AI_PIPELINE_URI_RECOGNITION_SERVER_PORT: "17128"
config:
metadata-service-mapping.yaml: |
@@ -343,3 +347,7 @@ features:
javaAgentInjector:
enabled: false
agentImage: ~
+
+ r3:
+ enabled: false
+ image: ~
diff --git a/docs/readme.md b/docs/readme.md
index e9fbcdf..f563542 100644
--- a/docs/readme.md
+++ b/docs/readme.md
@@ -110,6 +110,7 @@ Currently, the features supported are:
| `apisix-monitor` | Deploy OpenTelemetry and export APISIX metrics to SkyWalking for analysis and display on UI | |
| `mesh-with-agent` | Deploy services with java agent in the service mesh environment. | Only support deployment in the Kubernetes environment, docker is not supported. |
| `grafana` | Deploy a Grafana to show SkyWalking metrics and logs on the Grafana UI. | Feel free to modify the Grafana config when deploy your own environment. |
+| `r3` | Deploy [R3](https://github.com/SkyAPM/R3) as RESTful URL recognition service. | |
### Kubernetes