statefulset.yaml 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. apiVersion: apps/v1beta1
  2. kind: StatefulSet
  3. metadata:
  4. name: e-school-applet
  5. namespace: i2
  6. spec:
  7. replicas: 1
  8. # volumeClaimTemplates:
  9. # - metadata:
  10. # name: i2-upload
  11. # spec:
  12. # storageClassName: managed-nfs-storage
  13. # accessModes: [ "ReadWriteMany" ]
  14. # resources:
  15. # requests:
  16. # storage: 1Gi
  17. selector:
  18. matchLabels:
  19. app: e-school-applet
  20. template:
  21. metadata:
  22. labels:
  23. app: e-school-applet
  24. spec:
  25. hostAliases:
  26. - ip: "192.168.0.1"
  27. hostnames:
  28. - "www.ccbeetech.com"
  29. - "ccbeetech.com"
  30. containers:
  31. - name: e-school-applet
  32. # 10479
  33. image: docker.i2erp.cn/e-school-backend:10866
  34. imagePullPolicy: Always
  35. volumeMounts:
  36. # - name: i2-upload
  37. # mountPath: /app/files
  38. # readOnly: false
  39. # subPath: files
  40. - name: config
  41. mountPath: /app/conf/
  42. - name: date-config
  43. mountPath: /etc/localtime
  44. resources:
  45. requests:
  46. memory: "8Gi"
  47. cpu: "1000m"
  48. # resources:
  49. # limits:
  50. # cpu: 4096m
  51. # memory: 6Gi
  52. # requests:
  53. # cpu: 2048m
  54. # memory: 2Gi
  55. ports:
  56. - containerPort: 8080
  57. - containerPort: 389
  58. imagePullSecrets:
  59. - name: registrykey-i2erp
  60. volumes:
  61. - name: config
  62. configMap:
  63. name: e-school-applet
  64. - name: date-config
  65. hostPath:
  66. path: /etc/localtime