carts-dep.yaml 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. ---
  2. apiVersion: apps/v1
  3. kind: Deployment
  4. metadata:
  5. name: carts
  6. labels:
  7. name: carts
  8. spec:
  9. replicas: 1
  10. selector:
  11. matchLabels:
  12. name: carts
  13. template:
  14. metadata:
  15. labels:
  16. name: carts
  17. spec:
  18. containers:
  19. - name: carts
  20. image: weaveworksdemos/carts:0.4.8
  21. env:
  22. - name: ZIPKIN
  23. value: zipkin.jaeger.svc.cluster.local
  24. - name: JAVA_OPTS
  25. value: -Xms64m -Xmx128m -XX:PermSize=32m -XX:MaxPermSize=64m -XX:+UseG1GC -Djava.security.egd=file:/dev/urandom
  26. resources:
  27. limits:
  28. cpu: 300m
  29. memory: 500Mi
  30. requests:
  31. cpu: 300m
  32. memory: 500Mi
  33. ports:
  34. - containerPort: 80
  35. securityContext:
  36. runAsNonRoot: true
  37. runAsUser: 10001
  38. capabilities:
  39. drop:
  40. - all
  41. add:
  42. - NET_BIND_SERVICE
  43. readOnlyRootFilesystem: true
  44. volumeMounts:
  45. - mountPath: /tmp
  46. name: tmp-volume
  47. livenessProbe:
  48. httpGet:
  49. path: /health
  50. port: 80
  51. initialDelaySeconds: 300
  52. periodSeconds: 3
  53. readinessProbe:
  54. httpGet:
  55. path: /health
  56. port: 80
  57. initialDelaySeconds: 180
  58. periodSeconds: 3
  59. volumes:
  60. - name: tmp-volume
  61. emptyDir:
  62. medium: Memory
  63. nodeSelector:
  64. beta.kubernetes.io/os: linux