open.yml 1.2 KB

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