This is an automated email from the ASF dual-hosted git repository. zhongxjian pushed a commit to branch sample_v1 in repository https://gitbox.apache.org/repos/asf/dubbo-kubernetes.git
commit 975ac28c600e9a5e4032f8a463714df50a644b4e Author: mfordjody <[email protected]> AuthorDate: Sun May 11 11:55:04 2025 +0800 [addons] add sample jaeger yaml --- samples/addons/grafana.yaml | 24 ++++ samples/addons/jaeger.yaml | 135 +++++++++++++++++++++ samples/addons/prometheus.yaml | 15 +++ {tests => samples}/app/consumer/deployment.yaml | 28 +---- .../provider => samples/app/consumer}/service.yaml | 4 +- {tests => samples}/app/provider/deployment.yaml | 30 +---- .../consumer => samples/app/provider}/service.yaml | 4 +- .../dubbo.apache.org_authenticationpolicies.yaml | 0 .../dubbo.apache.org_authorizationpolicies.yaml | 0 .../traffic/dubbo.apache.org_conditionroutes.yaml | 0 .../traffic/dubbo.apache.org_dynamicconfigs.yaml | 0 .../dubbo.apache.org_servicenamemappings.yaml | 0 .../crds}/traffic/dubbo.apache.org_tagroutes.yaml | 0 tools/{dev => }/install-dev-tools.sh | 0 14 files changed, 187 insertions(+), 53 deletions(-) diff --git a/samples/addons/grafana.yaml b/samples/addons/grafana.yaml index 54085e39..8ba09adb 100644 --- a/samples/addons/grafana.yaml +++ b/samples/addons/grafana.yaml @@ -1,3 +1,18 @@ +# 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. + --- # Source: grafana/templates/serviceaccount.yaml apiVersion: v1 @@ -50,6 +65,15 @@ data: orgId: 1 type: prometheus url: http://prometheus:9090 + - access: proxy + editable: true + isDefault: false + jsonData: + timeInterval: 15s + name: Jaeger + orgId: 1 + type: jaeger + url: http://tracing:16686 dashboardproviders.yaml: | apiVersion: 1 providers: diff --git a/samples/addons/jaeger.yaml b/samples/addons/jaeger.yaml new file mode 100644 index 00000000..49994244 --- /dev/null +++ b/samples/addons/jaeger.yaml @@ -0,0 +1,135 @@ +# 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. + +apiVersion: apps/v1 +kind: Deployment +metadata: + name: jaeger + namespace: dubbo-system + labels: + app: jaeger +spec: + selector: + matchLabels: + app: jaeger + template: + metadata: + labels: + app: jaeger + annotations: + prometheus.io/scrape: "true" + prometheus.io/port: "14269" + spec: + containers: + - name: jaeger + image: "docker.io/jaegertracing/all-in-one:1.67.0" + env: + - name: BADGER_EPHEMERAL + value: "false" + - name: SPAN_STORAGE_TYPE + value: "badger" + - name: BADGER_DIRECTORY_VALUE + value: "/badger/data" + - name: BADGER_DIRECTORY_KEY + value: "/badger/key" + - name: COLLECTOR_ZIPKIN_HOST_PORT + value: ":9411" + - name: MEMORY_MAX_TRACES + value: "50000" + - name: QUERY_BASE_PATH + value: /jaeger + livenessProbe: + httpGet: + path: / + port: 14269 + readinessProbe: + httpGet: + path: / + port: 14269 + volumeMounts: + - name: data + mountPath: /badger + resources: + requests: + cpu: 10m + volumes: + - name: data + emptyDir: {} +--- +apiVersion: v1 +kind: Service +metadata: + name: tracing + namespace: dubbo-system + labels: + app: jaeger +spec: + type: ClusterIP + ports: + - name: http-query + port: 80 + protocol: TCP + targetPort: 16686 + # Note: Change port name if you add '--query.grpc.tls.enabled=true' + - name: grpc-query + port: 16685 + protocol: TCP + targetPort: 16685 + selector: + app: jaeger +--- +# Jaeger implements the Zipkin API. To support swapping out the tracing backend, we use a Service named Zipkin. +apiVersion: v1 +kind: Service +metadata: + labels: + name: zipkin + name: zipkin + namespace: dubbo-system +spec: + ports: + - port: 9411 + targetPort: 9411 + name: http-query + selector: + app: jaeger +--- +apiVersion: v1 +kind: Service +metadata: + name: jaeger-collector + namespace: dubbo-system + labels: + app: jaeger +spec: + type: ClusterIP + ports: + - name: jaeger-collector-http + port: 14268 + targetPort: 14268 + protocol: TCP + - name: jaeger-collector-grpc + port: 14250 + targetPort: 14250 + protocol: TCP + - port: 9411 + targetPort: 9411 + name: http-zipkin + - port: 4317 + name: grpc-otel + - port: 4318 + name: http-otel + selector: + app: jaeger diff --git a/samples/addons/prometheus.yaml b/samples/addons/prometheus.yaml index f0bbaeb8..662da168 100644 --- a/samples/addons/prometheus.yaml +++ b/samples/addons/prometheus.yaml @@ -1,3 +1,18 @@ +# 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. + --- # Source: prometheus/templates/serviceaccount.yaml apiVersion: v1 diff --git a/tests/app/consumer/deployment.yaml b/samples/app/consumer/deployment.yaml similarity index 62% rename from tests/app/consumer/deployment.yaml rename to samples/app/consumer/deployment.yaml index 0cf965ca..cfc2734d 100644 --- a/tests/app/consumer/deployment.yaml +++ b/samples/app/consumer/deployment.yaml @@ -16,19 +16,17 @@ apiVersion: apps/v1 kind: Deployment metadata: - name: dubbo-samples-apiserver-consumer + name: dubbo-samples-consumer namespace: dubbo-system spec: - replicas: 2 + replicas: 1 selector: matchLabels: - app: dubbo-samples-apiserver-consumer + app: dubbo-samples-consumer template: metadata: - annotations: - dubbo.io/xds-enable: enabled labels: - app: dubbo-samples-apiserver-consumer + app: dubbo-samples-consumer spec: containers: - name: server @@ -36,21 +34,3 @@ spec: imagePullPolicy: Always ports: - containerPort: 20880 - livenessProbe: - httpGet: - path: /live - port: 22222 - initialDelaySeconds: 5 - periodSeconds: 5 - readinessProbe: - httpGet: - path: /ready - port: 22222 - initialDelaySeconds: 5 - periodSeconds: 5 - startupProbe: - httpGet: - path: /startup - port: 22222 - failureThreshold: 30 - periodSeconds: 10 diff --git a/tests/app/provider/service.yaml b/samples/app/consumer/service.yaml similarity index 89% rename from tests/app/provider/service.yaml rename to samples/app/consumer/service.yaml index 878f3479..7b0a80d9 100644 --- a/tests/app/provider/service.yaml +++ b/samples/app/consumer/service.yaml @@ -16,12 +16,12 @@ apiVersion: v1 kind: Service metadata: - name: dubbo-samples-apiserver-provider + name: dubbo-samples-consumer namespace: dubbo-system spec: clusterIP: None selector: - app: dubbo-samples-apiserver-provider + app: dubbo-samples-consumer ports: - protocol: TCP port: 20880 diff --git a/tests/app/provider/deployment.yaml b/samples/app/provider/deployment.yaml similarity index 60% rename from tests/app/provider/deployment.yaml rename to samples/app/provider/deployment.yaml index c2bc7719..259843ae 100644 --- a/tests/app/provider/deployment.yaml +++ b/samples/app/provider/deployment.yaml @@ -16,41 +16,21 @@ apiVersion: apps/v1 kind: Deployment metadata: - name: dubbo-samples-apiserver-provider + name: dubbo-samples-provider namespace: dubbo-system spec: - replicas: 3 + replicas: 1 selector: matchLabels: - app: dubbo-samples-apiserver-provider + app: dubbo-samples-provider template: metadata: - annotations: - dubbo.io/ingress: enabled labels: - app: dubbo-samples-apiserver-provider + app: dubbo-samples-provider spec: containers: - name: server image: apache/dubbo-demo:dubbo-samples-apiserver-provider_0.0.1 imagePullPolicy: Always ports: - - containerPort: 20880 - livenessProbe: - httpGet: - path: /live - port: 22222 - initialDelaySeconds: 5 - periodSeconds: 5 - readinessProbe: - httpGet: - path: /ready - port: 22222 - initialDelaySeconds: 5 - periodSeconds: 5 - startupProbe: - httpGet: - path: /startup - port: 22222 - failureThreshold: 30 - periodSeconds: 10 + - containerPort: 20880 \ No newline at end of file diff --git a/tests/app/consumer/service.yaml b/samples/app/provider/service.yaml similarity index 89% rename from tests/app/consumer/service.yaml rename to samples/app/provider/service.yaml index d918e65a..afe939b8 100644 --- a/tests/app/consumer/service.yaml +++ b/samples/app/provider/service.yaml @@ -16,12 +16,12 @@ apiVersion: v1 kind: Service metadata: - name: dubbo-samples-apiserver-consumer + name: dubbo-samples-provider namespace: dubbo-system spec: clusterIP: None selector: - app: dubbo-samples-apiserver-consumer + app: dubbo-samples-provider ports: - protocol: TCP port: 20880 diff --git a/tests/auth/dubbo.apache.org_authenticationpolicies.yaml b/tools/crds/auth/dubbo.apache.org_authenticationpolicies.yaml similarity index 100% rename from tests/auth/dubbo.apache.org_authenticationpolicies.yaml rename to tools/crds/auth/dubbo.apache.org_authenticationpolicies.yaml diff --git a/tests/auth/dubbo.apache.org_authorizationpolicies.yaml b/tools/crds/auth/dubbo.apache.org_authorizationpolicies.yaml similarity index 100% rename from tests/auth/dubbo.apache.org_authorizationpolicies.yaml rename to tools/crds/auth/dubbo.apache.org_authorizationpolicies.yaml diff --git a/tests/traffic/dubbo.apache.org_conditionroutes.yaml b/tools/crds/traffic/dubbo.apache.org_conditionroutes.yaml similarity index 100% rename from tests/traffic/dubbo.apache.org_conditionroutes.yaml rename to tools/crds/traffic/dubbo.apache.org_conditionroutes.yaml diff --git a/tests/traffic/dubbo.apache.org_dynamicconfigs.yaml b/tools/crds/traffic/dubbo.apache.org_dynamicconfigs.yaml similarity index 100% rename from tests/traffic/dubbo.apache.org_dynamicconfigs.yaml rename to tools/crds/traffic/dubbo.apache.org_dynamicconfigs.yaml diff --git a/tests/traffic/dubbo.apache.org_servicenamemappings.yaml b/tools/crds/traffic/dubbo.apache.org_servicenamemappings.yaml similarity index 100% rename from tests/traffic/dubbo.apache.org_servicenamemappings.yaml rename to tools/crds/traffic/dubbo.apache.org_servicenamemappings.yaml diff --git a/tests/traffic/dubbo.apache.org_tagroutes.yaml b/tools/crds/traffic/dubbo.apache.org_tagroutes.yaml similarity index 100% rename from tests/traffic/dubbo.apache.org_tagroutes.yaml rename to tools/crds/traffic/dubbo.apache.org_tagroutes.yaml diff --git a/tools/dev/install-dev-tools.sh b/tools/install-dev-tools.sh similarity index 100% rename from tools/dev/install-dev-tools.sh rename to tools/install-dev-tools.sh
