胖子天骄的MES系统
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.

k8s_pztjapi.yaml 1.3 KiB

1 年之前
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. apiVersion: apps/v1
  2. kind: Deployment
  3. metadata:
  4. name: pztjapi
  5. namespace: kube-<NAMESPACES>
  6. spec:
  7. selector:
  8. matchLabels:
  9. app: pztjapi
  10. replicas: 1
  11. template:
  12. metadata:
  13. labels:
  14. app: pztjapi
  15. spec:
  16. containers:
  17. - image: 10.2.1.24:10242/bpa/pztjapi:<BUILD_TAG>
  18. imagePullPolicy: IfNotPresent
  19. name: pztjapi
  20. env:
  21. - name: branch
  22. value: <BRANCH_NAME>
  23. - name: TZ
  24. value: Asia/Shanghai
  25. ports:
  26. - containerPort: 80
  27. protocol: TCP
  28. volumeMounts:
  29. - mountPath: "/app/appsettings.json"
  30. name: pztjapi-config
  31. readOnly: true
  32. subPath: appsettings
  33. - mountPath: "/etc/localtime"
  34. name: timezone
  35. resources:
  36. requests:
  37. cpu: "100m"
  38. memory: "112Mi"
  39. limits:
  40. cpu: "500m"
  41. memory: "512Mi"
  42. volumes:
  43. - name: pztjapi-config
  44. configMap:
  45. name: pztjapi-config
  46. - name: timezone
  47. hostPath:
  48. path: /usr/share/zoneinfo/Asia/Shanghai
  49. ---
  50. kind: Service
  51. apiVersion: v1
  52. metadata:
  53. labels:
  54. app: pztjapi
  55. name: pztjapi
  56. namespace: kube-<NAMESPACES>
  57. spec:
  58. type: ClusterIP
  59. ports:
  60. - port: 80
  61. name: http
  62. selector:
  63. app: pztjapi