parent
e048813c43
commit
e8e4af7286
@ -1,92 +1,31 @@
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: StatefulSet
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: admin-cms
|
||||
name: api-deployment
|
||||
spec:
|
||||
podManagementPolicy: OrderedReady
|
||||
replicas: 1
|
||||
revisionHistoryLimit: 10
|
||||
selector:
|
||||
matchLabels:
|
||||
app: admin-cms
|
||||
workload.auth.cattle.io/workloadselector: statefulSet-openim-admin-cms
|
||||
serviceName: admin-cms
|
||||
app: admin_cms # 选择这个指定标签执行
|
||||
replicas: 2 # 运行pod数量
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: admin-cms
|
||||
workload.auth.cattle.io/workloadselector: statefulSet-openim-admin-cms
|
||||
app: api # 标签
|
||||
spec:
|
||||
containers:
|
||||
- image: "IMAGE_TAG"
|
||||
env:
|
||||
- name: NODE_NAME
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
fieldPath: spec.nodeName
|
||||
- name: POD_NAME
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
apiVersion: v1
|
||||
fieldPath: metadata.name
|
||||
- name: NODE_IP
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
apiVersion: v1
|
||||
fieldPath: status.hostIP
|
||||
- name: POD_IP
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
apiVersion: v1
|
||||
fieldPath: status.podIP
|
||||
- name: NAMESPACE
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
apiVersion: v1
|
||||
fieldPath: metadata.namespace
|
||||
- name: api
|
||||
image: openim/api:v2.0.10
|
||||
ports:
|
||||
- name: p11000
|
||||
protocol: TCP
|
||||
containerPort: 11000
|
||||
imagePullPolicy: Always
|
||||
name: admin-cms
|
||||
stdin: true
|
||||
terminationMessagePath: /dev/termination-log
|
||||
terminationMessagePolicy: File
|
||||
tty: true
|
||||
- containerPort: 10002
|
||||
volumeMounts:
|
||||
- mountPath: /Open-IM-Server/config.tmp.yaml
|
||||
name: vol2
|
||||
- name: config
|
||||
mountPath: /Open-IM-Server/config
|
||||
readOnly: true
|
||||
subPath: config.yaml
|
||||
dnsConfig: {}
|
||||
dnsPolicy: ClusterFirst
|
||||
restartPolicy: Always
|
||||
schedulerName: default-scheduler
|
||||
securityContext: {}
|
||||
terminationGracePeriodSeconds: 30
|
||||
volumes:
|
||||
- configMap:
|
||||
defaultMode: 256
|
||||
name: config.yaml
|
||||
optional: false
|
||||
name: vol2
|
||||
updateStrategy:
|
||||
rollingUpdate:
|
||||
partition: 0
|
||||
type: RollingUpdate
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: admin-cms
|
||||
spec:
|
||||
ports:
|
||||
- name: p11000
|
||||
port: 11000
|
||||
protocol: TCP
|
||||
targetPort: 11000
|
||||
selector:
|
||||
app: admin-cms
|
||||
type: ClusterIP
|
||||
- name: config
|
||||
configMap:
|
||||
name: config
|
||||
strategy: #更新策略
|
||||
type: RollingUpdate # 滚动更新
|
||||
|
||||
|
Loading…
Reference in new issue