Start adding grafana monitoring stack
This commit is contained in:
21
clusters/kairos/monitoring/grafana/helmrelease.yaml
Normal file
21
clusters/kairos/monitoring/grafana/helmrelease.yaml
Normal file
@@ -0,0 +1,21 @@
|
||||
apiVersion: helm.toolkit.fluxcd.io/v2
|
||||
kind: HelmRelease
|
||||
metadata:
|
||||
name: grafana
|
||||
spec:
|
||||
chart:
|
||||
spec:
|
||||
chart: grafana/grafana
|
||||
reconcileStrategy: ChartVersion
|
||||
sourceRef:
|
||||
kind: HelmRepository
|
||||
name: grafana-repo
|
||||
version: 8.4.1
|
||||
valuesFiles:
|
||||
- values.yaml
|
||||
interval: 1m0s
|
||||
targetNamespace: monitoring
|
||||
values:
|
||||
persistence:
|
||||
enabled: true
|
||||
storageClassName: longhorn
|
||||
16
clusters/kairos/monitoring/grafana/ingress.yaml
Normal file
16
clusters/kairos/monitoring/grafana/ingress.yaml
Normal file
@@ -0,0 +1,16 @@
|
||||
# apiVersion: traefik.io/v1alpha1
|
||||
# kind: IngressRoute
|
||||
# metadata:
|
||||
# name: grafana
|
||||
# spec:
|
||||
# entryPoints:
|
||||
# - web
|
||||
# routes:
|
||||
# - match: Host(`grafana.k3s`)
|
||||
# kind: Rule
|
||||
# services:
|
||||
# - name:
|
||||
# namespace: monitoring
|
||||
# nativeLB: true
|
||||
# kind: Service
|
||||
# port: 80
|
||||
5
clusters/kairos/monitoring/grafana/kustomization.yaml
Normal file
5
clusters/kairos/monitoring/grafana/kustomization.yaml
Normal file
@@ -0,0 +1,5 @@
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
resources:
|
||||
- helmrelease.yaml
|
||||
# - ingress.yaml
|
||||
8
clusters/kairos/monitoring/helmrepo.yaml
Normal file
8
clusters/kairos/monitoring/helmrepo.yaml
Normal file
@@ -0,0 +1,8 @@
|
||||
---
|
||||
apiVersion: source.toolkit.fluxcd.io/v1
|
||||
kind: HelmRepository
|
||||
metadata:
|
||||
name: grafana-repo
|
||||
spec:
|
||||
interval: 1m0s
|
||||
url: https://grafana.github.io/helm-charts
|
||||
9
clusters/kairos/monitoring/kustomization.yaml
Normal file
9
clusters/kairos/monitoring/kustomization.yaml
Normal file
@@ -0,0 +1,9 @@
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
namespace: monitoring
|
||||
resources:
|
||||
- namespace.yaml
|
||||
- helmrepo.yaml
|
||||
- ./loki
|
||||
- ./promtail
|
||||
- ./grafana
|
||||
71
clusters/kairos/monitoring/loki/helmrelease.yaml
Normal file
71
clusters/kairos/monitoring/loki/helmrelease.yaml
Normal file
@@ -0,0 +1,71 @@
|
||||
apiVersion: helm.toolkit.fluxcd.io/v2
|
||||
kind: HelmRelease
|
||||
metadata:
|
||||
name: loki
|
||||
spec:
|
||||
chart:
|
||||
spec:
|
||||
chart: grafana/loki
|
||||
reconcileStrategy: ChartVersion
|
||||
sourceRef:
|
||||
kind: HelmRepository
|
||||
name: grafana-repo
|
||||
version: 6.7.4
|
||||
valuesFiles:
|
||||
- values.yaml
|
||||
interval: 1m0s
|
||||
targetNamespace: monitoring
|
||||
values:
|
||||
loki:
|
||||
schemaConfig:
|
||||
configs:
|
||||
- from: 2024-04-01
|
||||
store: tsdb
|
||||
object_store: s3
|
||||
schema: v13
|
||||
index:
|
||||
prefix: loki_index_
|
||||
period: 24h
|
||||
ingester:
|
||||
chunk_encoding: snappy
|
||||
tracing:
|
||||
enabled: true
|
||||
querier:
|
||||
max_concurrent: 2
|
||||
|
||||
deploymentMode: SimpleScalable
|
||||
|
||||
backend:
|
||||
replicas: 1
|
||||
read:
|
||||
replicas: 1
|
||||
write:
|
||||
replicas: 1
|
||||
|
||||
# Enable minio for storage
|
||||
minio:
|
||||
enabled: true
|
||||
persistence:
|
||||
storageClass: longhorn
|
||||
|
||||
# Zero out replica counts of other deployment modes
|
||||
singleBinary:
|
||||
replicas: 0
|
||||
ingester:
|
||||
replicas: 0
|
||||
querier:
|
||||
replicas: 0
|
||||
queryFrontend:
|
||||
replicas: 0
|
||||
queryScheduler:
|
||||
replicas: 0
|
||||
distributor:
|
||||
replicas: 0
|
||||
compactor:
|
||||
replicas: 0
|
||||
indexGateway:
|
||||
replicas: 0
|
||||
bloomCompactor:
|
||||
replicas: 0
|
||||
bloomGateway:
|
||||
replicas: 0
|
||||
4
clusters/kairos/monitoring/loki/kustomization.yaml
Normal file
4
clusters/kairos/monitoring/loki/kustomization.yaml
Normal file
@@ -0,0 +1,4 @@
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
resources:
|
||||
- helmrelease.yaml
|
||||
4
clusters/kairos/monitoring/namespace.yaml
Normal file
4
clusters/kairos/monitoring/namespace.yaml
Normal file
@@ -0,0 +1,4 @@
|
||||
apiVersion: v1
|
||||
kind: Namespace
|
||||
metadata:
|
||||
name: monitoring
|
||||
22
clusters/kairos/monitoring/promtail/helmrelease.yaml
Normal file
22
clusters/kairos/monitoring/promtail/helmrelease.yaml
Normal file
@@ -0,0 +1,22 @@
|
||||
apiVersion: helm.toolkit.fluxcd.io/v2
|
||||
kind: HelmRelease
|
||||
metadata:
|
||||
name: promtail-release
|
||||
spec:
|
||||
chart:
|
||||
spec:
|
||||
chart: grafana/promtail
|
||||
reconcileStrategy: ChartVersion
|
||||
sourceRef:
|
||||
kind: HelmRepository
|
||||
name: grafana-repo
|
||||
version: 6.16.4
|
||||
valuesFiles:
|
||||
- values.yaml
|
||||
interval: 1m0s
|
||||
targetNamespace: monitoring
|
||||
values:
|
||||
config:
|
||||
clients:
|
||||
- url: http://loki.monitoring.svc.cluster.local/loki/api/v1/push
|
||||
tenant_id: 1
|
||||
4
clusters/kairos/monitoring/promtail/kustomization.yaml
Normal file
4
clusters/kairos/monitoring/promtail/kustomization.yaml
Normal file
@@ -0,0 +1,4 @@
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
resources:
|
||||
- helmrelease.yaml
|
||||
Reference in New Issue
Block a user