grafana-deployment.yaml 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  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. - name: GF_DATABASE_WAL
  23. value: "true"
  24. image: grafana/grafana:latest
  25. imagePullPolicy: Always
  26. name: grafana
  27. ports:
  28. - containerPort: 3000
  29. name: http
  30. readinessProbe:
  31. httpGet:
  32. path: /api/health
  33. port: http
  34. resources:
  35. limits:
  36. cpu: 200m
  37. memory: 200Mi
  38. requests:
  39. cpu: 100m
  40. memory: 100Mi
  41. volumeMounts:
  42. - mountPath: /var/lib/grafana
  43. name: grafana-storage
  44. readOnly: false
  45. securityContext:
  46. fsGroup: 65534
  47. runAsNonRoot: true
  48. runAsUser: 65534
  49. serviceAccountName: grafana
  50. volumes:
  51. - name: grafana-storage
  52. persistentVolumeClaim:
  53. claimName: grafana-pvc