golang-im聊天
選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。
 
 
 
 

54 行
1.1 KiB

  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-logic:202209018-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. labels:
  46. app: connect # 只有设置label,才能被服务发现找到
  47. spec:
  48. selector:
  49. app: connect
  50. ports:
  51. - protocol: TCP
  52. port: 8000
  53. targetPort: 8000