This repository has been archived on 2024-10-29. You can view files and clone it, but cannot push or open issues or pull requests.
homelab/kubernetes/infrastructure/monitoring/kube-prometheus-stack.yaml

76 lines
1.9 KiB
YAML
Raw Normal View History

2024-09-22 01:33:56 +01:00
---
apiVersion: source.toolkit.fluxcd.io/v1
kind: HelmRepository
metadata:
2024-09-22 01:39:38 +01:00
name: monitoring
2024-09-22 01:33:56 +01:00
namespace: monitoring
spec:
interval: 5m0s
2024-09-22 01:33:56 +01:00
url: https://prometheus-community.github.io/helm-charts
---
apiVersion: helm.toolkit.fluxcd.io/v2
kind: HelmRelease
metadata:
name: kube-prometheus-stack
namespace: monitoring
spec:
interval: 30m
chart:
spec:
chart: kube-prometheus-stack
version: "65.1.0"
2024-09-22 01:33:56 +01:00
sourceRef:
kind: HelmRepository
2024-09-22 01:39:38 +01:00
name: monitoring
2024-09-22 01:33:56 +01:00
namespace: monitoring
interval: 12h
2024-09-22 06:18:56 +01:00
values:
# Prometheus Volume
prometheus:
prometheusSpec:
2024-09-22 07:14:08 +01:00
scrapeInterval: 30s
2024-09-22 06:37:04 +01:00
evaluationInterval: 30s
2024-09-22 06:27:52 +01:00
ruleSelectorNilUsesHelmValues: false
serviceMonitorSelectorNilUsesHelmValues: false
podMonitorSelectorNilUsesHelmValues: false
probeSelectorNilUsesHelmValues: false
scrapeConfigSelectorNilUsesHelmValues: false
enableAdminAPI: true
walCompression: true
enableFeatures:
- auto-gomemlimit
- memory-snapshot-on-shutdown
- new-service-discovery-manager
2024-09-22 07:14:08 +01:00
retention: 30d
2024-09-22 06:27:52 +01:00
retentionSize: 40GB
resources:
requests:
cpu: 100m
limits:
memory: 1500Mi
2024-09-22 06:18:56 +01:00
storageSpec:
2024-09-22 06:23:14 +01:00
volumeClaimTemplate:
spec:
storageClassName: nfs-csi
accessModes: ["ReadWriteOnce"]
resources:
requests:
storage: 50Gi
2024-09-26 15:17:36 +01:00
# ServiceMonitor configurations
serviceMonitors:
node-exporter:
metricRelabelings:
- action: replace
regex: (.*)
replacement: $1
sourceLabels:
- __meta_kubernetes_pod_node_name
targetLabel: kubernetes_node
kubelet:
2024-09-26 15:15:05 +01:00
metricRelabelings:
- action: replace
sourceLabels:
- node
targetLabel: instance