open.yml 1.3 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. imagePullSecrets:
  21. - name: registry-key
  22. containers:
  23. - command: [ "java","-cp","/*","com.sxtvs.open.OpenApplication","--spring.profiles.active=prod" ]
  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: open
  32. resources:
  33. limits:
  34. cpu: 4000m
  35. memory: 8192Mi
  36. requests:
  37. cpu: 3000m
  38. memory: 7168Mi
  39. livenessProbe:
  40. httpGet:
  41. port: 80
  42. path: /hello
  43. initialDelaySeconds: 3
  44. periodSeconds: 3
  45. readinessProbe:
  46. httpGet:
  47. port: 80
  48. path: /hello
  49. initialDelaySeconds: 3
  50. periodSeconds: 3
  51. timeoutSeconds: 1
  52. dnsPolicy: ClusterFirst
  53. terminationGracePeriodSeconds: 30