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 2021/11/22 05:36:12 UTC
[skywalking-showcase] branch main updated: Add custom service name for control plane metrics
This is an automated email from the ASF dual-hosted git repository.
kezhenxu94 pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/skywalking-showcase.git
The following commit(s) were added to refs/heads/main by this push:
new 0507bfe Add custom service name for control plane metrics
0507bfe is described below
commit 0507bfee085e786399592675563777f6a94be482
Author: kezhenxu94 <ke...@apache.org>
AuthorDate: Mon Nov 22 13:36:01 2021 +0800
Add custom service name for control plane metrics
---
.../kubernetes/feature-cluster/resources.yaml | 76 ++++++++++++++--------
.../kubernetes/feature-single-node/resources.yaml | 67 ++++++++++++-------
2 files changed, 92 insertions(+), 51 deletions(-)
diff --git a/deploy/platform/kubernetes/feature-cluster/resources.yaml b/deploy/platform/kubernetes/feature-cluster/resources.yaml
index 9e1f41d..d6dc7a0 100644
--- a/deploy/platform/kubernetes/feature-cluster/resources.yaml
+++ b/deploy/platform/kubernetes/feature-cluster/resources.yaml
@@ -29,6 +29,40 @@ spec:
targetPort: 9200
---
+apiVersion: v1
+data:
+ metadata-service-mapping.yaml: |
+ serviceName: agentless::${LABELS."service.istio.io/canonical-name",LABELS."app.kubernetes.io/name",LABELS.app}
+kind: ConfigMap
+metadata:
+ name: oap-static-config
+
+---
+apiVersion: v1
+data:
+ core.default.log4j-xml: |-
+ <Configuration status="WARN">
+ <Appenders>
+ <Console name="Console" target="SYSTEM_OUT">
+ <PatternLayout charset="UTF-8" pattern="%d - %c - %L [%t] %-5p %x - %m%n"/>
+ </Console>
+ </Appenders>
+ <Loggers>
+ <logger name="io.grpc.netty" level="INFO"/>
+ <logger name="org.apache.skywalking.oap.server.configuration.api" level="TRACE"/>
+ <logger name="org.apache.skywalking.oap.server.configuration.configmap" level="DEBUG"/>
+ <Root level="WARN">
+ <AppenderRef ref="Console"/>
+ </Root>
+ </Loggers>
+ </Configuration>
+kind: ConfigMap
+metadata:
+ labels:
+ app: oap
+ name: oap-dynamic-config
+
+---
apiVersion: apps/v1
kind: Deployment
metadata:
@@ -61,31 +95,6 @@ spec:
---
apiVersion: v1
-data:
- core.default.log4j-xml: |-
- <Configuration status="WARN">
- <Appenders>
- <Console name="Console" target="SYSTEM_OUT">
- <PatternLayout charset="UTF-8" pattern="%d - %c - %L [%t] %-5p %x - %m%n"/>
- </Console>
- </Appenders>
- <Loggers>
- <logger name="io.grpc.netty" level="INFO"/>
- <logger name="org.apache.skywalking.oap.server.configuration.api" level="TRACE"/>
- <logger name="org.apache.skywalking.oap.server.configuration.configmap" level="DEBUG"/>
- <Root level="WARN">
- <AppenderRef ref="Console"/>
- </Root>
- </Loggers>
- </Configuration>
-kind: ConfigMap
-metadata:
- labels:
- app: oap
- name: oap-config
-
----
-apiVersion: v1
kind: Service
metadata:
name: oap
@@ -140,7 +149,14 @@ spec:
value: "0"
- name: SW_TELEMETRY
value: prometheus
-
+ volumeMounts:
+ - name: config-volume
+ mountPath: /skywalking/config/metadata-service-mapping.yaml
+ subPath: metadata-service-mapping.yaml
+ volumes:
+ - name: config-volume
+ configMap:
+ name: oap-static-config
---
apiVersion: apps/v1
kind: Deployment
@@ -218,6 +234,14 @@ spec:
value: "agentless::${service.metadata.name}"
- name: SW_CONFIGURATION
value: k8s-configmap
+ volumeMounts:
+ - name: config-volume
+ mountPath: /skywalking/config/metadata-service-mapping.yaml
+ subPath: metadata-service-mapping.yaml
+ volumes:
+ - name: config-volume
+ configMap:
+ name: oap-static-config
---
apiVersion: v1
diff --git a/deploy/platform/kubernetes/feature-single-node/resources.yaml b/deploy/platform/kubernetes/feature-single-node/resources.yaml
index 1e04be7..49ff0c3 100644
--- a/deploy/platform/kubernetes/feature-single-node/resources.yaml
+++ b/deploy/platform/kubernetes/feature-single-node/resources.yaml
@@ -29,6 +29,40 @@ spec:
targetPort: 9200
---
+apiVersion: v1
+data:
+ metadata-service-mapping.yaml: |
+ serviceName: agentless::${LABELS."service.istio.io/canonical-name",LABELS."app.kubernetes.io/name",LABELS.app}
+kind: ConfigMap
+metadata:
+ name: oap-static-config
+
+---
+apiVersion: v1
+data:
+ core.default.log4j-xml: |-
+ <Configuration status="WARN">
+ <Appenders>
+ <Console name="Console" target="SYSTEM_OUT">
+ <PatternLayout charset="UTF-8" pattern="%d - %c - %L [%t] %-5p %x - %m%n"/>
+ </Console>
+ </Appenders>
+ <Loggers>
+ <logger name="io.grpc.netty" level="INFO"/>
+ <logger name="org.apache.skywalking.oap.server.configuration.api" level="TRACE"/>
+ <logger name="org.apache.skywalking.oap.server.configuration.configmap" level="DEBUG"/>
+ <Root level="WARN">
+ <AppenderRef ref="Console"/>
+ </Root>
+ </Loggers>
+ </Configuration>
+kind: ConfigMap
+metadata:
+ labels:
+ app: oap
+ name: oap-dynamic-config
+
+---
apiVersion: apps/v1
kind: Deployment
metadata:
@@ -61,31 +95,6 @@ spec:
---
apiVersion: v1
-data:
- core.default.log4j-xml: |-
- <Configuration status="WARN">
- <Appenders>
- <Console name="Console" target="SYSTEM_OUT">
- <PatternLayout charset="UTF-8" pattern="%d - %c - %L [%t] %-5p %x - %m%n"/>
- </Console>
- </Appenders>
- <Loggers>
- <logger name="io.grpc.netty" level="INFO"/>
- <logger name="org.apache.skywalking.oap.server.configuration.api" level="TRACE"/>
- <logger name="org.apache.skywalking.oap.server.configuration.configmap" level="DEBUG"/>
- <Root level="WARN">
- <AppenderRef ref="Console"/>
- </Root>
- </Loggers>
- </Configuration>
-kind: ConfigMap
-metadata:
- labels:
- app: oap
- name: oap-config
-
----
-apiVersion: v1
kind: Service
metadata:
name: oap
@@ -167,6 +176,14 @@ spec:
value: "agentless::${service.metadata.name}"
- name: SW_CONFIGURATION
value: k8s-configmap
+ volumeMounts:
+ - name: config-volume
+ mountPath: /skywalking/config/metadata-service-mapping.yaml
+ subPath: metadata-service-mapping.yaml
+ volumes:
+ - name: config-volume
+ configMap:
+ name: oap-static-config
---
apiVersion: v1