恢复deploy文件

This commit is contained in:
wulin 2023-11-15 14:51:03 +08:00
parent b0d7b6781e
commit f609e1132c
2 changed files with 23 additions and 14 deletions

View File

@ -21,10 +21,25 @@ spec:
labels:
app: iot-box-user-api
spec:
initContainers:
- name: agent-container
image: apache/skywalking-java-agent:8.7.0-alpine
volumeMounts:
- name: skywalking-agent
mountPath: /agent
command: [ "/bin/sh" ]
args: [ "-c", "cp -R /skywalking/agent /agent/" ]
imagePullSecrets:
- name: aliyun-hub-register #提前在项目下配置访问阿里云的账号密码
containers:
- image: $REGISTRY/$DOCKERHUB_NAMESPACE/qiuguo-iot:iot-box-user-api-SNAPSHOT-v$BUILD_NUMBER
- image: $REGISTRY/$DOCKERHUB_NAMESPACE/qiuguo-iot:iot-box-user-api-test-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
@ -45,9 +60,8 @@ spec:
volumeMounts:
- mountPath: /home/qiuguo/logs
name: iot-logs
- name: host-time
readOnly: true
mountPath: /etc/localtime
- name: skywalking-agent
mountPath: /skywalking
terminationMessagePath: /nfs/data/qiuguo/iot/logs
terminationMessagePolicy: File
dnsPolicy: ClusterFirst
@ -57,9 +71,8 @@ spec:
- name: iot-logs
hostPath:
path: /nfs/data/qiuguo/iot/logs
- name: host-time
hostPath:
path: /etc/localtime
- name: skywalking-agent
emptyDir: { }
---
apiVersion: v1
kind: Service

View File

@ -24,7 +24,7 @@ spec:
imagePullSecrets:
- name: aliyun-hub-register #提前在项目下配置访问阿里云的账号密码
containers:
- image: $REGISTRY/$DOCKERHUB_NAMESPACE/qiuguo-iot:iot-box-websocket-api-SNAPSHOT-v$BUILD_NUMBER
- image: $REGISTRY/$DOCKERHUB_NAMESPACE/qiuguo-iot:iot-box-websocket-api-SNAPSHOT-v1.0.0
readinessProbe:
httpGet:
path: /actuator/health
@ -39,15 +39,14 @@ spec:
protocol: TCP
resources:
requests: #资源请求的设置
cpu: 0m #Cpu请求容器启动的初始可用数量
memory: 600Mi #内存清楚,容器启动的初始可用数量
limits:
cpu: 80m
memory: 600Mi
volumeMounts:
- mountPath: /home/qiuguo/logs
name: iot-logs
- name: host-time
readOnly: true
mountPath: /etc/localtime
terminationMessagePath: /nfs/data/qiuguo/iot/logs
terminationMessagePolicy: File
dnsPolicy: ClusterFirst
@ -57,9 +56,6 @@ spec:
- name: iot-logs
hostPath:
path: /nfs/data/qiuguo/iot/logs
- name: host-time
hostPath:
path: /etc/localtime
---
apiVersion: v1
kind: Service