60 lines
2.0 KiB
YAML

---
apiVersion: helm.toolkit.fluxcd.io/v2
kind: HelmRelease
metadata:
name: kube-prometheus-stack
namespace: flux-system
spec:
interval: 10m
releaseName: kube-prometheus-stack
targetNamespace: monitor
chart:
spec:
chart: kube-prometheus-stack
sourceRef:
kind: HelmRepository
name: prometheus-community
namespace: flux-system
interval: 10m
values:
grafana:
adminPassword: admin
defaultDashboardsTimezone: browser
# This kind of sucks, but this is a forward declaration of the issuer and
# ingress class. The problem is that we want Traefik and other services
# to be able to use Prometheus operators, but they require CRDs installed
# within this chart.
#
# By sequencing Prometheus to be installed first, these labels just won't
# be recognized by the ingress and cluster issuer until they're installed
# later -- undesirable, but acceptable -- as opposed to flatly failing
# from missing CRDs by installing Traefik first.
#
# Really, the ideal solution is probably to install all CRDs first, but
# I'm not sure how to do that in a way that guarantees compatibility
# with the CRDs that might be installed in Helm charts later. We can skip
# installing CRDs from the Helm chart, but if the CRDs get updated, we
# need to manually update the CRDs in our repository.
#
# Alternatively, we could declare an Ingress/IngressRoute after Traefik
# is installed, but it wouldn't solve the root problem around dependent
# CRDs
ingress:
enabled: true
annotations:
cert-manager.io/cluster-issuer: le-cf-issuer
kubernetes.io/ingress.class: traefik
hosts:
- gf.dolo.mnke.org
prometheus:
prometheusSpec:
storageSpec:
volumeClaimTemplate:
spec:
storageClassName: longhorn
accessModes: ["ReadWriteOnce"]
resources:
requests:
storage: 4Gi