web-dev-deployment.yml 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. apiVersion: extensions/v1beta1
  2. kind: Deployment
  3. metadata:
  4. name: ai-web
  5. labels:
  6. app-name: ai-web
  7. spec:
  8. replicas: 1
  9. strategy:
  10. rollingUpdate:
  11. maxSurge: 1
  12. maxUnavailable: 1
  13. type: RollingUpdate
  14. template:
  15. metadata:
  16. labels:
  17. app-name: ai-web
  18. spec:
  19. imagePullSecrets:
  20. - name: registry-harbor
  21. containers:
  22. - name: ai-web
  23. image: {IMAGE_URL}
  24. imagePullPolicy: Always
  25. resources:
  26. requests:
  27. cpu: 1000m
  28. memory: 1048Mi
  29. limits:
  30. cpu: 1000m
  31. memory: 2048Mi
  32. env:
  33. # 网关服务地址(外部地址,用于nginx增加网关代理)
  34. - name: __GATEWAY_URL
  35. value: http://svc-ai-gateway.ns-aisquare-dev:8182
  36. # API服务地址(网关地址),如设置为空,将通过前端服务代理访问网关
  37. - name: __WEB_SERVER_URL
  38. value: http://ai-dev-dev.asiainfo.com
  39. # 图像标注服务地址,用于nginx cvat代理,内部地址
  40. - name: __CVAT_URL
  41. value: http://svc-ai-cvat:80
  42. # 文本标注服务地址,用于nginx cvat代理,内部地址
  43. - name: __DOCCANO_URL
  44. value: http://svc-ai-doccano:80
  45. # 前端访问上下文地址
  46. - name: __WEB_CONTEXT_PATH
  47. value: ""
  48. ports:
  49. - containerPort: 8181
  50. name: ai-web-port
  51. protocol: TCP
  52. volumeMounts:
  53. - mountPath: /data/ai_lab/ai_web/
  54. name: volume-aiweb
  55. # volumes:
  56. # - name: volume-aiweb
  57. # persistentVolumeClaim:
  58. # claimName: ai-claim-web
  59. volumes:
  60. - hostPath:
  61. path: /nfsdata/aisquare-dev/web
  62. name: volume-aiweb