Files
biz_supplier_manage/deployment-uat.yaml

106 lines
2.6 KiB
YAML
Raw Normal View History

2021-01-15 11:03:36 +08:00
# 接口版本
apiVersion: apps/v1
# 接口类型
kind: Deployment
metadata:
name: biz-service-ebtp-project
namespace: default
labels:
app: biz-service-ebtp-project
2025-04-30 10:44:47 +08:00
2021-01-15 11:03:36 +08:00
# 必选,详细定义
spec:
# pod 副本数量
replicas: 1
2025-04-30 10:44:47 +08:00
2021-01-15 11:03:36 +08:00
# 滚动升级配置信息
strategy:
rollingUpdate:
maxSurge: 1
maxUnavailable: 1
2025-04-30 10:44:47 +08:00
2021-01-15 11:03:36 +08:00
# 选择器匹配pod模板
selector:
matchLabels:
app: biz-service-ebtp-project
2025-04-30 10:44:47 +08:00
2021-01-15 11:03:36 +08:00
template:
metadata:
labels:
# 模板名称
app: biz-service-ebtp-project
2021-01-27 15:48:16 +08:00
annotations:
prometheus.io/port: '18012'
prometheus.io/jl-pod: 'true'
2025-04-30 10:44:47 +08:00
2021-01-15 11:03:36 +08:00
# 定义容器模板,该模板可以包含多个容器
spec:
# 挂载日志存储
volumes:
- name: log
hostPath: #以下三选一
path: /var/lib/docker/log/349553515466-uat/default-group/all #uat环境
2025-04-30 10:44:47 +08:00
2021-01-15 11:03:36 +08:00
# 必选Pod中容器列表
containers:
- name: biz-service-ebtp-project
image: harbor.dcos.guangzhou.unicom.local/eshop/biz-service-ebtp-project:latest
# 在容器中挂载日志存储区
volumeMounts:
- name: log
mountPath: /log
# 需要暴露的端口库号列表
ports:
- containerPort: 18012
resources:
requests:
cpu: 2000m
memory: 4Gi
limits:
cpu: 4000m
memory: 8Gi
2021-01-15 11:03:36 +08:00
# 容器运行前需设置的环境变量列表
env:
# Apollo 配置中心变量设置
- name: APOLLO_CONFIGSERVICE
2021-04-10 12:04:34 +08:00
value: http://apollo-configservice:8080
2021-05-18 16:20:55 +08:00
- name: APP_NAME
value: biz_service_ebtp_project_uat
2021-04-10 12:04:34 +08:00
- name: MY_POD_IP #自动获取pod ip作为agent id
valueFrom:
fieldRef:
fieldPath: status.podIP
2021-05-28 10:16:23 +08:00
- name: SW_AGENT_COLLECTOR_BACKEND_SERVICES
value: skywalking-oap-cluster.skywalking:11800
- name: SW_AGENT_NAME
2025-04-30 10:44:47 +08:00
value: biz_supplier_manage
- name: JAVA_TOOL_OPTIONS
value: -XX:+UnlockExperimentalVMOptions
-XX:+UseContainerSupport
-XX:+UseCGroupMemoryLimitForHeap
-XX:InitialRAMPercentage=40.0
-XX:MinRAMPercentage=20.0
-XX:MaxRAMPercentage=80.0
2021-01-15 11:03:36 +08:00
---
kind: Service
apiVersion: v1
metadata:
name: biz-service-ebtp-project
namespace: default
labels:
app: biz-service-ebtp-project
annotations:
2021-04-10 12:04:34 +08:00
# lb.cke.tg.unicom/target-vports: 18012-18012
2021-01-27 15:48:16 +08:00
prometheus.io/port: '18012'
prometheus.io/jl-svc: 'true'
2021-01-15 11:03:36 +08:00
spec:
ports:
- port: 18012
targetPort: 18012
selector:
app: biz-service-ebtp-project
status:
loadBalancer: {}
2025-04-30 10:44:47 +08:00
---