server-deployment.yaml 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. ---
  2. # Source: loki-stack/charts/prometheus/templates/server-deployment.yaml
  3. apiVersion: apps/v1
  4. kind: Deployment
  5. metadata:
  6. labels:
  7. component: "server"
  8. app: prometheus
  9. release: loki
  10. chart: prometheus-9.3.1
  11. heritage: Tiller
  12. name: loki-prometheus-server
  13. spec:
  14. selector:
  15. matchLabels:
  16. component: "server"
  17. app: prometheus
  18. release: loki
  19. replicas: 1
  20. template:
  21. metadata:
  22. labels:
  23. component: "server"
  24. app: prometheus
  25. release: loki
  26. chart: prometheus-9.3.1
  27. heritage: Tiller
  28. spec:
  29. serviceAccountName: loki-prometheus-server
  30. containers:
  31. - name: prometheus-server-configmap-reload
  32. image: "jimmidyson/configmap-reload:v0.2.2"
  33. imagePullPolicy: "IfNotPresent"
  34. args:
  35. - --volume-dir=/etc/config
  36. - --webhook-url=http://127.0.0.1:9090/-/reload
  37. resources:
  38. {}
  39. volumeMounts:
  40. - name: config-volume
  41. mountPath: /etc/config
  42. readOnly: true
  43. - name: prometheus-server
  44. image: "prom/prometheus:v2.13.1"
  45. imagePullPolicy: "IfNotPresent"
  46. args:
  47. - --storage.tsdb.retention.time=15d
  48. - --config.file=/etc/config/prometheus.yml
  49. - --storage.tsdb.path=/data
  50. - --web.console.libraries=/etc/prometheus/console_libraries
  51. - --web.console.templates=/etc/prometheus/consoles
  52. - --web.enable-lifecycle
  53. ports:
  54. - containerPort: 9090
  55. readinessProbe:
  56. httpGet:
  57. path: /-/ready
  58. port: 9090
  59. initialDelaySeconds: 30
  60. timeoutSeconds: 30
  61. livenessProbe:
  62. httpGet:
  63. path: /-/healthy
  64. port: 9090
  65. initialDelaySeconds: 30
  66. timeoutSeconds: 30
  67. resources:
  68. {}
  69. volumeMounts:
  70. - name: config-volume
  71. mountPath: /etc/config
  72. - name: storage-volume
  73. mountPath: /data
  74. subPath: ""
  75. securityContext:
  76. fsGroup: 65534
  77. runAsGroup: 65534
  78. runAsNonRoot: true
  79. runAsUser: 65534
  80. terminationGracePeriodSeconds: 300
  81. volumes:
  82. - name: config-volume
  83. configMap:
  84. name: loki-prometheus-server
  85. - name: storage-volume
  86. persistentVolumeClaim:
  87. claimName: loki-prometheus-server