This commit is contained in:
HDW
2026-07-26 12:42:40 +02:00
parent 93cf8574ac
commit 3e54420d5b
3 changed files with 81 additions and 0 deletions

View File

@@ -0,0 +1,16 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: loki-grafana-datasource
namespace: monitoring
labels:
grafana_datasource: "1"
data:
loki-datasource.yaml: |
apiVersion: 1
datasources:
- name: Loki
type: loki
access: proxy
url: http://loki-stack:3100
isDefault: false

View File

@@ -0,0 +1,40 @@
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: loki-stack
namespace: argocd
spec:
project: default
source:
repoURL: https://grafana.github.io/helm-charts
targetRevision: 2.10.3
chart: loki-stack
helm:
values: |
# Eigenes Grafana nicht noetig, wir haben schon eins ueber kube-prometheus-stack
grafana:
enabled: false
promtail:
enabled: true
loki:
persistence:
enabled: true
size: 10Gi
config:
table_manager:
retention_deletes_enabled: true
retention_period: 168h
destination:
server: https://kubernetes.default.svc
namespace: monitoring
syncPolicy:
automated:
prune: true
selfHeal: true
syncOptions:
- CreateNamespace=true
- ServerSideApply=true
- SkipDryRunOnMissingResource=true

View File

@@ -0,0 +1,25 @@
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: grafana-ingress
namespace: monitoring
annotations:
kubernetes.io/ingress.class: traefik
cert-manager.io/cluster-issuer: letsencrypt-prod
spec:
ingressClassName: traefik
rules:
- host: grafana.unreg-hdw.de
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: prometheus-stack-grafana
port:
number: 80
tls:
- hosts:
- grafana.unreg-hdw.de
secretName: grafana-tls-cert