open.yml 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  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: [ "java","-jar","/app.jar" ]
  22. env:
  23. - name: PATH
  24. value: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
  25. - name: TZ
  26. value: Asia/Shanghai
  27. image: { { image } }
  28. imagePullPolicy: IfNotPresent
  29. name: open
  30. resources:
  31. requests:
  32. limits:
  33. cpu: 100m
  34. memory: 512Mi
  35. requests:
  36. cpu: 100m
  37. memory: 256Mi
  38. livenessProbe:
  39. httpGet:
  40. port: 80
  41. path: /hello
  42. initialDelaySeconds: 3
  43. periodSeconds: 30
  44. readinessProbe:
  45. httpGet:
  46. port: 80
  47. path: /hello
  48. initialDelaySeconds: 3
  49. periodSeconds: 5
  50. timeoutSeconds: 1
  51. dnsPolicy: ClusterFirst
  52. terminationGracePeriodSeconds: 30