grafana-deployment.yaml 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. apiVersion: apps/v1
  2. kind: Deployment
  3. metadata:
  4. labels:
  5. app: grafana
  6. name: grafana
  7. namespace: monitoring
  8. spec:
  9. strategy:
  10. type: Recreate
  11. replicas: 1
  12. selector:
  13. matchLabels:
  14. app: grafana
  15. template:
  16. metadata:
  17. labels:
  18. app: grafana
  19. spec:
  20. containers:
  21. - env: []
  22. image: grafana/grafana:latest
  23. name: grafana
  24. ports:
  25. - containerPort: 3000
  26. name: http
  27. readinessProbe:
  28. httpGet:
  29. path: /api/health
  30. port: http
  31. resources:
  32. limits:
  33. cpu: 200m
  34. memory: 200Mi
  35. requests:
  36. cpu: 100m
  37. memory: 100Mi
  38. volumeMounts:
  39. - mountPath: /var/lib/grafana
  40. name: grafana-storage
  41. readOnly: false
  42. securityContext:
  43. fsGroup: 65534
  44. runAsNonRoot: true
  45. runAsUser: 65534
  46. serviceAccountName: grafana
  47. volumes:
  48. - name: grafana-storage
  49. persistentVolumeClaim:
  50. claimName: grafana-pvc