statefulset.yaml 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. apiVersion: apps/v1beta1
  2. kind: StatefulSet
  3. metadata:
  4. name: i2-pusher-backend
  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: i2-pusher-backend
  20. template:
  21. metadata:
  22. labels:
  23. app: i2-pusher-backend
  24. spec:
  25. hostAliases:
  26. - ip: "192.168.0.1"
  27. hostnames:
  28. - "www.ccbeetech.com"
  29. - "ccbeetech.com"
  30. containers:
  31. - name: i2-pusher-backend
  32. image: docker.i2erp.cn/i2-pusher-backend:10951
  33. volumeMounts:
  34. - name: i2-upload
  35. mountPath: /app/files
  36. readOnly: false
  37. subPath: files
  38. - name: config
  39. mountPath: /app/conf/
  40. - name: date-config
  41. mountPath: /etc/localtime
  42. resources:
  43. limits:
  44. memory: "2Gi"
  45. cpu: "1000m"
  46. requests:
  47. memory: "10Mi"
  48. cpu: "10m"
  49. ports:
  50. - containerPort: 8080
  51. - containerPort: 389
  52. imagePullSecrets:
  53. - name: registrykey-i2erp
  54. volumes:
  55. - name: config
  56. configMap:
  57. name: i2-pusher-backend
  58. - name: date-config
  59. hostPath:
  60. path: /etc/localtime