Files
kubernetes/namespaces/monitoring/kube-prometheus-stack-chart.yml
2025-03-25 09:44:40 -04:00

118 lines
3.8 KiB
YAML

apiVersion: helm.cattle.io/v1
kind: HelmChart
metadata:
name: prometheus
namespace: monitoring
spec:
chart: kube-prometheus-stack
targetNamespace: monitoring
repo: https://prometheus-community.github.io/helm-charts
# https://artifacthub.io/packages/helm/prometheus-community/kube-prometheus-stack
version: 70.0.2
valuesContent: |-
grafana.ini:
auth:
signout_redirect_url: "https://login.keligrubb.com/application/o/<Slug of the application from above>/end-session/"
oauth_auto_login: true
auth.generic_oauth:
name: authentik
enabled: true
client_id: "<Client ID from above>"
client_secret: "<Client Secret from above>"
scopes: "openid profile email"
auth_url: "https://login.keligrubb.com/application/o/authorize/"
token_url: "https://login.keligrubb.com/application/o/ti needoken/"
api_url: "https://login.keligrubb.com/application/o/userinfo/"
# Optionally map user groups to Grafana roles
role_attribute_path: contains(groups, 'Grafana Admins') && 'Admin' || contains(groups, 'Grafana Editors') && 'Editor' || 'Viewer'
grafana:
defaultDashboardsTimezone: "US/Eastern"
ingress:
enabled: true
ingressClassName: nginx
annotations:
cert-manager.io/cluster-issuer: "letsencrypt-cluster-issuer"
paths:
- path: "/"
pathType: Prefix
hosts:
- monitoring.keligrubb.com
tls:
- secretName: monitoring-tls
hosts:
- monitoring.keligrubb.com
additionalDataSources:
- name: Loki
type: loki
access: proxy
basicAuth: false
url: http://loki-gateway.monitoring.svc.cluster.local
config:
auth:
signout_redirect_url: "https://login.keligrubb.com/application/o/grafana/end-session/"
oauth_auto_login: true
auth.generic_oauth:
name: authentik
enabled: true
client_id: "<Client ID from above>"
client_secret: "<Client Secret from above>"
scopes: "openid profile email"
auth_url: "https://login.keligrubb.com/application/o/authorize/"
token_url: "https://login.keligrubb.com/application/o/token/"
api_url: "https://login.keligrubb.com/application/o/userinfo/"
role_attribute_path: "contains(groups, 'Grafana Admins') && 'Admin' || contains(groups, 'Grafana Editors') && 'Editor' || 'Viewer'"
kubelet:
serviceMonitor:
metricRelabelings:
- action: replace
sourceLabels:
- node
targetLabel: instance
kube-state-metrics:
selfMonitor:
enabled: true
prometheus:
selfMonitor:
metricRelabelings:
- action: replace
regex: (.*)
replacement: $1
sourceLabels:
- __meta_kubernetes_pod_node_name
targetLabel: kubernetes_node
prometheus:
ingress:
enabled: true
ingressClassName: nginx
paths:
- /
hosts:
- prometheus.keligrubb.com
prometheusSpec:
replicaExternalLabelName: "replica"
ruleSelectorNilUsesHelmValues: false
serviceMonitorSelectorNilUsesHelmValues: false
podMonitorSelectorNilUsesHelmValues: false
probeSelectorNilUsesHelmValues: fales
retention: 30d
retentionSize: "64GB"
enableAdminAPI: true
securityContext:
runAsUser: 0
runAsNonRoot: false
runAsGroup: 0
fsGroup: 65534
storageSpec:
volumeClaimTemplate:
spec:
storageclassname: longhorn
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 64Gi