FEAT(grafana): add Thanos as default datasource
- Add Thanos Query as default Prometheus datasource - Keep original Prometheus datasource as backup - Thanos provides deduplicated metrics from HA Prometheus REFACTOR(thanos): move all components to master node - Add tolerations for control-plane:NoSchedule - Add nodeSelector for control-plane node - Affects: query, storegateway, compactor - PVC will be recreated on master node (data in S3) FIX(thanos): allow non-Bitnami images (quay.io/thanos) FIX(thanos): correct nodeSelector value to 'true'
This commit is contained in:
@@ -54,11 +54,19 @@ datasources:
|
|||||||
datasources.yaml:
|
datasources.yaml:
|
||||||
apiVersion: 1
|
apiVersion: 1
|
||||||
datasources:
|
datasources:
|
||||||
|
- name: Thanos
|
||||||
|
type: prometheus
|
||||||
|
access: proxy
|
||||||
|
url: http://thanos-query.thanos.svc.cluster.local:9090
|
||||||
|
isDefault: true
|
||||||
|
editable: true
|
||||||
|
jsonData:
|
||||||
|
timeInterval: "60s"
|
||||||
- name: Prometheus
|
- name: Prometheus
|
||||||
type: prometheus
|
type: prometheus
|
||||||
access: proxy
|
access: proxy
|
||||||
url: http://prometheus-kube-prometheus-prometheus.prometheus.svc.cluster.local:9090
|
url: http://prometheus-kube-prometheus-prometheus.prometheus.svc.cluster.local:9090
|
||||||
isDefault: true
|
isDefault: false
|
||||||
editable: true
|
editable: true
|
||||||
- name: Loki
|
- name: Loki
|
||||||
type: loki
|
type: loki
|
||||||
|
|||||||
@@ -7,6 +7,11 @@
|
|||||||
# - Store Gateway: reads historical data from MinIO
|
# - Store Gateway: reads historical data from MinIO
|
||||||
# - Compactor: compacts and downsamples data in MinIO
|
# - Compactor: compacts and downsamples data in MinIO
|
||||||
|
|
||||||
|
# Allow non-Bitnami images (quay.io/thanos/thanos)
|
||||||
|
global:
|
||||||
|
security:
|
||||||
|
allowInsecureImages: true
|
||||||
|
|
||||||
# Use quay.io image to avoid Docker Hub rate limits
|
# Use quay.io image to avoid Docker Hub rate limits
|
||||||
image:
|
image:
|
||||||
registry: quay.io
|
registry: quay.io
|
||||||
@@ -24,6 +29,14 @@ query:
|
|||||||
enabled: true
|
enabled: true
|
||||||
replicaCount: 1
|
replicaCount: 1
|
||||||
|
|
||||||
|
# Run on master node for stability
|
||||||
|
tolerations:
|
||||||
|
- key: node-role.kubernetes.io/control-plane
|
||||||
|
operator: Exists
|
||||||
|
effect: NoSchedule
|
||||||
|
nodeSelector:
|
||||||
|
node-role.kubernetes.io/control-plane: "true"
|
||||||
|
|
||||||
# Deduplicate metrics from multiple Prometheus replicas
|
# Deduplicate metrics from multiple Prometheus replicas
|
||||||
dnsDiscovery:
|
dnsDiscovery:
|
||||||
enabled: true
|
enabled: true
|
||||||
@@ -58,6 +71,14 @@ storegateway:
|
|||||||
enabled: true
|
enabled: true
|
||||||
replicaCount: 1
|
replicaCount: 1
|
||||||
|
|
||||||
|
# Run on master node for stability
|
||||||
|
tolerations:
|
||||||
|
- key: node-role.kubernetes.io/control-plane
|
||||||
|
operator: Exists
|
||||||
|
effect: NoSchedule
|
||||||
|
nodeSelector:
|
||||||
|
node-role.kubernetes.io/control-plane: "true"
|
||||||
|
|
||||||
resources:
|
resources:
|
||||||
requests:
|
requests:
|
||||||
cpu: 15m
|
cpu: 15m
|
||||||
@@ -76,6 +97,14 @@ storegateway:
|
|||||||
compactor:
|
compactor:
|
||||||
enabled: true
|
enabled: true
|
||||||
|
|
||||||
|
# Run on master node for stability
|
||||||
|
tolerations:
|
||||||
|
- key: node-role.kubernetes.io/control-plane
|
||||||
|
operator: Exists
|
||||||
|
effect: NoSchedule
|
||||||
|
nodeSelector:
|
||||||
|
node-role.kubernetes.io/control-plane: "true"
|
||||||
|
|
||||||
# Retention settings
|
# Retention settings
|
||||||
retentionResolutionRaw: 7d # Keep raw data for 7 days
|
retentionResolutionRaw: 7d # Keep raw data for 7 days
|
||||||
retentionResolution5m: 30d # Keep 5m downsampled for 30 days
|
retentionResolution5m: 30d # Keep 5m downsampled for 30 days
|
||||||
|
|||||||
Reference in New Issue
Block a user