fix(kube-prometheus-stack): switch to openebs-hostpath and dynamic provisioning prometheus volume

This commit is contained in:
SeanOMik 2024-06-15 16:01:21 -04:00
parent 309dea1760
commit 135beb61fe
Signed by: SeanOMik
GPG Key ID: FEC9E2FC15235964
3 changed files with 6 additions and 26 deletions

View File

@ -1,4 +1,4 @@
apiVersion: helm.toolkit.fluxcd.io/v2beta2 apiVersion: helm.toolkit.fluxcd.io/v2
kind: HelmRelease kind: HelmRelease
metadata: metadata:
name: kube-prometheus-stack name: kube-prometheus-stack
@ -68,18 +68,15 @@ spec:
storageSpec: storageSpec:
volumeClaimTemplate: volumeClaimTemplate:
spec: spec:
storageClassName: longhorn storageClassName: openebs-hostpath
selector:
matchLabels:
app.kubernetes.io/name: kube-prometheus-stack-pv
resources: resources:
requests: requests:
storage: 15Gi storage: 40Gi
kubeControllerManager: kubeControllerManager:
enabled: true enabled: true
endpoints: endpoints:
- 192.168.87.250 - 192.168.10.40
service: service:
enabled: true enabled: true
port: 10257 port: 10257
@ -92,7 +89,7 @@ spec:
kubeScheduler: kubeScheduler:
enabled: true enabled: true
endpoints: endpoints:
- 192.168.87.250 - 192.168.10.40
service: service:
enabled: true enabled: true
port: 10259 port: 10259
@ -105,7 +102,7 @@ spec:
kubeProxy: kubeProxy:
enabled: true enabled: true
endpoints: endpoints:
- 192.168.87.250 - 192.168.10.40
service: service:
enabled: true enabled: true
port: 10249 port: 10249

View File

@ -1,7 +1,6 @@
apiVersion: kustomize.config.k8s.io/v1beta1 apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization kind: Kustomization
resources: resources:
- ./prom-pv.yaml
- ./helm-repository.yaml - ./helm-repository.yaml
- ./helm-release.yaml - ./helm-release.yaml
- ./alertmanager-config.yaml - ./alertmanager-config.yaml

View File

@ -1,16 +0,0 @@
apiVersion: v1
kind: PersistentVolume
metadata:
name: prometheus-pv
namespace: monitoring
labels:
app.kubernetes.io/name: kube-prometheus-stack-pv
spec:
storageClassName: hostpath
persistentVolumeReclaimPolicy: Retain
capacity:
storage: 30Gi
accessModes:
- ReadWriteOnce
hostPath:
path: "/mnt/MainPool/Kubernetes/prometheus"