|
|
@@ -2,25 +2,24 @@ kind: Deployment |
|
|
|
apiVersion: apps/v1 |
|
|
|
# 元数据 |
|
|
|
metadata: |
|
|
|
name: zyos-go-mq-consume-one-circles-v2 |
|
|
|
namespace: zhios |
|
|
|
name: egg-go-mq-consume |
|
|
|
namespace: egg |
|
|
|
labels: |
|
|
|
app: zyos-go-mq-consume-one-circles-v2 |
|
|
|
app: egg-go-mq-consume |
|
|
|
annotations: |
|
|
|
kubesphere.io/creator: dengbiao |
|
|
|
kubesphere.io/description: 一个圈圈v2 |
|
|
|
# deployment主要部分 |
|
|
|
spec: |
|
|
|
replicas: 1 |
|
|
|
selector: |
|
|
|
matchLabels: |
|
|
|
# 名称与上面的labels对应 |
|
|
|
app: zyos-go-mq-consume-one-circles-v2 |
|
|
|
app: egg-go-mq-consume |
|
|
|
template: |
|
|
|
metadata: |
|
|
|
labels: |
|
|
|
# 名称与上面的matchLabels对应 |
|
|
|
app: zyos-go-mq-consume-one-circles-v2 |
|
|
|
app: egg-go-mq-consume |
|
|
|
spec: |
|
|
|
# 声明挂载卷(将外部已存在的pvc、config等挂载进来) |
|
|
|
volumes: |
|
|
@@ -30,25 +29,25 @@ spec: |
|
|
|
path: /etc/localtime |
|
|
|
type: '' |
|
|
|
# 将前面创建的configMap也挂载进来 |
|
|
|
- name: zyos-go-mq-consume-cfg |
|
|
|
- name: egg-go-mq-consume-cfg |
|
|
|
configMap: |
|
|
|
# 这里的名字就是前面创建的configMap的名字 |
|
|
|
name: zyos-go-mq-consume-cfg |
|
|
|
name: egg-go-mq-consume-cfg |
|
|
|
defaultMode: 420 |
|
|
|
containers: |
|
|
|
# 主容器 |
|
|
|
- name: zyos-go-mq-consume-one-circles-v2-container |
|
|
|
- name: egg-go-mq-consume |
|
|
|
# 镜像地址(提前打包好并推送的镜像仓库) |
|
|
|
image: 'registry.cn-shenzhen.aliyuncs.com/fnuoos-prd/zyos-go-mq-consume-one-circles-v2:20240727-01' |
|
|
|
image: 'registry.cn-shenzhen.aliyuncs.com/fnuoos-prd/egg-go-mq-consume:0.0.1' |
|
|
|
# 将前面volume声明的需要用到的pvc、config挂载上来 |
|
|
|
volumeMounts: |
|
|
|
- name: host-time |
|
|
|
readOnly: true |
|
|
|
mountPath: /etc/localtime |
|
|
|
- name: zyos-go-mq-consume-cfg # 该名字对应前面volumes声明的名字 |
|
|
|
- name: egg-go-mq-consume-cfg # 该名字对应前面volumes声明的名字 |
|
|
|
readOnly: true |
|
|
|
# 挂载到容器的哪个路径 |
|
|
|
mountPath: /var/zyos |
|
|
|
mountPath: /var/egg |
|
|
|
imagePullPolicy: Always |
|
|
|
restartPolicy: Always |
|
|
|
terminationGracePeriodSeconds: 30 |