open-im-server/deploy_k8s/msg/deployment.yaml
wqy 05e9eec785 k8s部署描述文件建议调整
1.官网文档创建configmap名字已经从openim-config改为了config,部署文件内建议保持一致
2.创建usualConfig的configmap会报错,建议改成usual-config,官网文档建议改为
kubectl -n openim create configmap usual-config --from-file=config/usualConfig.yaml
3.调整了部分yaml缩紧格式更加正确
2022-11-30 13:38:47 +08:00

42 lines
1018 B
YAML

---
apiVersion: apps/v1
kind: Deployment
metadata:
name: msg-deployment
spec:
selector:
matchLabels:
app: msg # 选择这个指定标签执行
replicas: 1 # 运行pod数量
template:
metadata:
labels:
app: msg # 标签
spec:
containers:
- name: msg
image: openim/msg:v2.3.4
# imagePullPolicy: Always
ports:
- containerPort: 10130
volumeMounts:
- name: config
mountPath: /Open-IM-Server/config
readOnly: true
- name: usualConfig
mountPath: /Open-IM-Server/config
readOnly: true
env:
- name: CONFIG_NAME
value: "/Open-IM-Server"
- name: USUAL_CONFIG_NAME
value: "/Open-IM-Server"
volumes:
- name: config
configMap:
name: config
- name: usualConfig
configMap:
name: usual-config
strategy: #更新策略
type: RollingUpdate # 滚动更新