user-dep.yaml 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. ---
  2. apiVersion: apps/v1
  3. kind: Deployment
  4. metadata:
  5. name: user
  6. labels:
  7. name: user
  8. spec:
  9. replicas: 1
  10. selector:
  11. matchLabels:
  12. name: user
  13. template:
  14. metadata:
  15. labels:
  16. name: user
  17. spec:
  18. containers:
  19. - name: user
  20. image: weaveworksdemos/user:0.4.7
  21. resources:
  22. limits:
  23. cpu: 300m
  24. memory: 100Mi
  25. requests:
  26. cpu: 100m
  27. memory: 100Mi
  28. ports:
  29. - containerPort: 80
  30. env:
  31. - name: MONGO_HOST
  32. value: user-db:27017
  33. securityContext:
  34. runAsNonRoot: true
  35. runAsUser: 10001
  36. capabilities:
  37. drop:
  38. - all
  39. add:
  40. - NET_BIND_SERVICE
  41. readOnlyRootFilesystem: true
  42. livenessProbe:
  43. httpGet:
  44. path: /health
  45. port: 80
  46. initialDelaySeconds: 300
  47. periodSeconds: 3
  48. readinessProbe:
  49. httpGet:
  50. path: /health
  51. port: 80
  52. initialDelaySeconds: 180
  53. periodSeconds: 3
  54. nodeSelector:
  55. beta.kubernetes.io/os: linux