pull/455/head
wangchuxiao 3 years ago committed by Xinwei Xiong(cubxxw-openim)
parent f26170540f
commit b4caadc704

@ -0,0 +1,92 @@
---
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: admin-cms
spec:
podManagementPolicy: OrderedReady
replicas: 1
revisionHistoryLimit: 10
selector:
matchLabels:
app: admin-cms
workload.auth.cattle.io/workloadselector: statefulSet-openim-admin-cms
serviceName: admin-cms
template:
metadata:
labels:
app: admin-cms
workload.auth.cattle.io/workloadselector: statefulSet-openim-admin-cms
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
ports:
- name: p11000
protocol: TCP
containerPort: 11000
imagePullPolicy: Always
name: admin-cms
stdin: true
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
tty: true
volumeMounts:
- mountPath: /Open-IM-Server/config.tmp.yaml
name: vol2
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

@ -0,0 +1,44 @@
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: api-deployment
spec:
selector:
matchLabels:
app: api # 选择这个指定标签执行
replicas: 2 # 运行pod数量
template:
metadata:
labels:
app: api # 标签
spec:
containers:
- name: api
image: openim/api:2.0.10
ports:
- containerPort: 10002
volumeMounts:
- name: cfg
mountPath: /Open-IM-Server/config/config.yaml
subPath: config.yaml
updateStrategy: #更新策略
rollingUpdate:
partition: 1
type: RollingUpdate # 滚动更新
---
apiVersion: v1
kind: Service
metadata:
name: api
spec:
externalTrafficPolicy: Cluster
ports:
- name: apiPort
nodePort: NODE_PORT_API
port: 10002
protocol: TCP
targetPort: 10002
selector:
app: api
type: NodePort

@ -0,0 +1,77 @@
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
# 配置注解 支持websocket
annotations:
nginx.ingress.kubernetes.io/proxy-http-version: "1.1"
nginx.ingress.kubernetes.io/proxy-read-timeout: "3600"
nginx.ingress.kubernetes.io/proxy-send-timeout: "3600"
name: sdk-server.openim.xxx.com
spec:
rules:
- host: sdk-server.openim.xxx.com
http:
paths:
- backend:
service:
name: sdk-server
port:
number: 30000
path: /
pathType: Prefix
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
annotations:
nginx.ingress.kubernetes.io/proxy-http-version: "1.1"
nginx.ingress.kubernetes.io/proxy-read-timeout: "3600"
nginx.ingress.kubernetes.io/proxy-send-timeout: "3600"
name: msg-gateway.openim.xxx.com
spec:
rules:
- host: msg-gateway.openim.xxx.com
http:
paths:
- backend:
service:
name: msg-gateway
port:
number: 17778
path: /
pathType: Prefix
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: api.openim.xxx.com
spec:
rules:
- host: api.openim.xxx.com
http:
paths:
- backend:
service:
name: api
port:
number: 10000
path: /
pathType: Prefix
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: demo.openim.xxx.com
spec:
rules:
- host: demo.openim.xxx.com
http:
paths:
- backend:
service:
name: demo
port:
number: 42233
path: /
pathType: Prefix

@ -0,0 +1,24 @@
service=(
#api service file
api
cms_api
#rpc service file
user
friend
group
auth
admin_cms
message_cms
statistics
office
organization
conversation
cache
msg_gateway
transfer
msg
push
sdk_server
demo
)
Loading…
Cancel
Save