mirror of
https://github.com/optim-enterprises-bv/homelab.git
synced 2025-11-01 02:18:01 +00:00
feat(monitoring): Configure kube-prometheus-stack
Use Argo CD Application again. Provision storage.
This commit is contained in:
31
infra/monitoring/kube-prometheus-stack.yaml
Normal file
31
infra/monitoring/kube-prometheus-stack.yaml
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
# Need an extra Argo CD Application here to do server side apply
|
||||||
|
# https://github.com/prometheus-community/helm-charts/issues/3345
|
||||||
|
apiVersion: argoproj.io/v1alpha1
|
||||||
|
kind: Application
|
||||||
|
metadata:
|
||||||
|
name: kube-prometheus-stack
|
||||||
|
namespace: argocd
|
||||||
|
finalizers:
|
||||||
|
- resources-finalizer.argocd.argoproj.io
|
||||||
|
spec:
|
||||||
|
project: infrastructure
|
||||||
|
sources:
|
||||||
|
- repoURL: https://prometheus-community.github.io/helm-charts
|
||||||
|
chart: kube-prometheus-stack
|
||||||
|
targetRevision: 57.2.1
|
||||||
|
helm:
|
||||||
|
valueFiles:
|
||||||
|
- $values/infra/monitoring/values.yaml
|
||||||
|
- repoURL: https://github.com/vehagn/homelab
|
||||||
|
targetRevision: HEAD
|
||||||
|
ref: values
|
||||||
|
destination:
|
||||||
|
name: in-cluster
|
||||||
|
namespace: monitoring
|
||||||
|
syncPolicy:
|
||||||
|
automated:
|
||||||
|
selfHeal: true
|
||||||
|
prune: true
|
||||||
|
syncOptions:
|
||||||
|
- ApplyOutOfSyncOnly=true
|
||||||
|
- ServerSideApply=true
|
||||||
@@ -3,21 +3,7 @@ kind: Kustomization
|
|||||||
|
|
||||||
resources:
|
resources:
|
||||||
- ns.yaml
|
- ns.yaml
|
||||||
|
- pv.yaml
|
||||||
|
- kube-prometheus-stack.yaml
|
||||||
- ingress-route.yaml
|
- ingress-route.yaml
|
||||||
- auth
|
- auth
|
||||||
|
|
||||||
helmCharts:
|
|
||||||
- name: kube-prometheus-stack
|
|
||||||
repo: https://prometheus-community.github.io/helm-charts
|
|
||||||
version: 57.2.1
|
|
||||||
releaseName: kube-prometheus-stack
|
|
||||||
namespace: monitoring
|
|
||||||
valuesInline:
|
|
||||||
prometheus-node-exporter:
|
|
||||||
hostRootFsMount:
|
|
||||||
enabled: false
|
|
||||||
prometheusOperator:
|
|
||||||
admissionWebhooks:
|
|
||||||
failurePolicy: Ignore
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
24
infra/monitoring/pv.yaml
Normal file
24
infra/monitoring/pv.yaml
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: PersistentVolume
|
||||||
|
metadata:
|
||||||
|
name: prometheus
|
||||||
|
labels:
|
||||||
|
app: prometheus
|
||||||
|
spec:
|
||||||
|
capacity:
|
||||||
|
storage: 10Gi
|
||||||
|
volumeMode: Filesystem
|
||||||
|
accessModes:
|
||||||
|
- ReadWriteOnce
|
||||||
|
persistentVolumeReclaimPolicy: Retain
|
||||||
|
storageClassName: prometheus
|
||||||
|
local:
|
||||||
|
path: /disk/etc/prometheus
|
||||||
|
nodeAffinity:
|
||||||
|
required:
|
||||||
|
nodeSelectorTerms:
|
||||||
|
- matchExpressions:
|
||||||
|
- key: kubernetes.io/hostname
|
||||||
|
operator: In
|
||||||
|
values:
|
||||||
|
- gauss
|
||||||
14
infra/monitoring/values.yaml
Normal file
14
infra/monitoring/values.yaml
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
prometheus:
|
||||||
|
prometheusSpec:
|
||||||
|
storageSpec:
|
||||||
|
volumeClaimTemplate:
|
||||||
|
spec:
|
||||||
|
storageClassName: prometheus
|
||||||
|
accessModes:
|
||||||
|
- ReadWriteOnce
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
storage: 10Gi
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: prometheus
|
||||||
Reference in New Issue
Block a user