网关deploy增加skywalking

This commit is contained in:
wulin 2023-12-05 11:02:42 +08:00
parent d21ebe4152
commit 1738dd8466

View File

@ -21,10 +21,28 @@ spec:
labels:
app: iot-gateway
spec:
initContainers:
- name: agent-container
image: apache/skywalking-java-agent:9.0.0-java8
volumeMounts:
- name: skywalking-agent
mountPath: /agent
command: [ "/bin/sh" ]
args: [ "-c", "cp /skywalking/agent/optional-plugins/apm-nacos-client-2.x-plugin-9.0.0.jar /skywalking/agent/plugins/\n
cp /skywalking/agent/optional-plugins/apm-spring-cloud-gateway-3.x-plugin-9.0.0.jar /skywalking/agent/plugins/\n
cp /skywalking/agent/optional-plugins/apm-spring-webflux-5.x-plugin-9.0.0.jar /skywalking/agent/plugins/ \n
cp -R /skywalking/agent /agent/" ]
imagePullSecrets:
- name: aliyun-hub-register #提前在项目下配置访问阿里云的账号密码
containers:
- image: $REGISTRY/$DOCKERHUB_NAMESPACE/qiuguo-iot:iot-gateway-SNAPSHOT-v$BUILD_NUMBER
env:
- name: JAVA_TOOL_OPTIONS
value: "-javaagent:/skywalking/agent/skywalking-agent.jar"
- name: SW_AGENT_NAME
value: "iot-box-user-api"
- name: SW_AGENT_COLLECTOR_BACKEND_SERVICES
value: "skywalking-oap.skywalking:11800"
readinessProbe:
httpGet:
path: /actuator/health