2
0

app.yaml 992 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. apiVersion: apps/v1
  2. kind: Deployment
  3. metadata:
  4. name: app
  5. labels:
  6. app: app
  7. env: release
  8. spec:
  9. selector:
  10. matchLabels:
  11. app: app
  12. replicas: 1
  13. strategy:
  14. type: RollingUpdate
  15. rollingUpdate:
  16. maxUnavailable: 0
  17. maxSurge: 1
  18. # minReadySeconds: 30
  19. template:
  20. metadata:
  21. labels:
  22. app: app
  23. spec:
  24. nodeSelector:
  25. fluentd: "true"
  26. containers:
  27. - name: app
  28. image: registry.cn-beijing.aliyuncs.com/dotbalo/alpine:3.6
  29. imagePullPolicy: IfNotPresent
  30. volumeMounts:
  31. - name: logpath
  32. mountPath: /opt/
  33. env:
  34. - name: TZ
  35. value: "Asia/Shanghai"
  36. - name: LANG
  37. value: C.UTF-8
  38. - name: LC_ALL
  39. value: C.UTF-8
  40. command:
  41. - sh
  42. - -c
  43. - while true; do date >> /opt/date.log; sleep 2; done
  44. volumes:
  45. - name: logpath
  46. emptyDir: {}