golang-im聊天
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

connect.yaml 1.3 KiB

2 jaren geleden
2 jaren geleden
2 jaren geleden
2 jaren geleden
2 jaren geleden
2 jaren geleden
2 jaren geleden
2 jaren geleden
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. # deployment 配置
  2. apiVersion: apps/v1
  3. kind: Deployment
  4. metadata:
  5. name: connect-deployment
  6. namespace: gim
  7. labels:
  8. app: connect
  9. spec:
  10. replicas: 1
  11. selector:
  12. matchLabels:
  13. app: connect
  14. template:
  15. metadata:
  16. labels:
  17. app: connect
  18. spec:
  19. containers:
  20. - name: connect
  21. image: 'registry.cn-shenzhen.aliyuncs.com/fnuoos-prd/zyos-gim-connect:20221128-01'
  22. imagePullPolicy: Always
  23. ports:
  24. - containerPort: 8000
  25. - containerPort: 8001
  26. - containerPort: 8002
  27. volumeMounts: # 映射文件为宿主机文件
  28. - mountPath: /log/
  29. name: log
  30. env:
  31. - name: POD_IP
  32. valueFrom:
  33. fieldRef:
  34. fieldPath: status.podIP
  35. volumes:
  36. - name: log
  37. hostPath:
  38. path: /log/
  39. ---
  40. # service 配置
  41. apiVersion: v1
  42. kind: Service
  43. metadata:
  44. name: connect
  45. namespace: gim
  46. labels:
  47. app: connect # 只有设置label,才能被服务发现找到
  48. spec:
  49. selector:
  50. app: connect
  51. ports:
  52. - name: rpclisten
  53. protocol: TCP
  54. port: 8000
  55. targetPort: 8000
  56. - name: tcplisten
  57. protocol: TCP
  58. port: 8001
  59. targetPort: 8001
  60. - name: wslisten
  61. protocol: TCP
  62. port: 8002
  63. targetPort: 8002