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_groupmeal.yaml 1.3 KiB

1 vuosi sitten
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. apiVersion: apps/v1
  2. kind: Deployment
  3. metadata:
  4. name: groupmeal
  5. namespace: kube-<NAMESPACES>
  6. spec:
  7. selector:
  8. matchLabels:
  9. app: groupmeal
  10. replicas: 1
  11. template:
  12. metadata:
  13. labels:
  14. app: groupmeal
  15. spec:
  16. containers:
  17. - image: 10.2.1.24:10242/bpa/groupmeal:<BUILD_TAG>
  18. imagePullPolicy: IfNotPresent
  19. name: groupmeal
  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: groupmeal-config
  31. readOnly: true
  32. subPath: appsetting
  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: groupmeal-config
  44. configMap:
  45. name: groupmeal-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: groupmeal
  55. name: groupmeal
  56. namespace: kube-<NAMESPACES>
  57. spec:
  58. type: ClusterIP
  59. ports:
  60. - port: 80
  61. name: http
  62. selector:
  63. app: groupmeal