neican.yml 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. apiVersion: apps/v1
  2. kind: Deployment
  3. metadata:
  4. name: neican
  5. spec:
  6. minReadySeconds: 5
  7. replicas: 1
  8. selector:
  9. matchLabels:
  10. k8s-app: neican
  11. strategy:
  12. type: RollingUpdate
  13. rollingUpdate:
  14. maxSurge: 1
  15. template:
  16. metadata:
  17. labels:
  18. k8s-app: neican
  19. spec:
  20. imagePullSecrets:
  21. - name: registry-key
  22. containers:
  23. - command: [ "java","-jar","/neican.jar"]
  24. env:
  25. - name: PATH
  26. value: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
  27. - name: TZ
  28. value: Asia/Shanghai
  29. image: { { image } }
  30. imagePullPolicy: IfNotPresent
  31. name: neican
  32. resources:
  33. limits:
  34. cpu: 4000m
  35. memory: 2048Mi
  36. requests:
  37. cpu: 1000m
  38. memory: 1024Mi
  39. livenessProbe:
  40. httpGet:
  41. port: 9002
  42. path: /neican/check
  43. initialDelaySeconds: 5
  44. periodSeconds: 3
  45. readinessProbe:
  46. httpGet:
  47. port: 9002
  48. path: /neican/check
  49. initialDelaySeconds: 5
  50. periodSeconds: 3
  51. timeoutSeconds: 1
  52. dnsPolicy: ClusterFirst
  53. terminationGracePeriodSeconds: 30