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