mirror of
https://github.com/Alkatrazz24/Funk-lab.git
synced 2026-07-10 13:34:43 +02:00
feat: NFS provisioner + persistance Prometheus et Grafana
- k8s/infra/nfs-provisioner/ : nfs-subdir-external-provisioner v4.0.18 StorageClass "nfs" (default), ReclaimPolicy=Retain, server=192.168.10.1 path=/srv/data/nfs/k8s (export RAID5 déjà existant) - k8s/apps-of-apps/apps/nfs-provisioner.yaml : Application ArgoCD - monitoring/values.yaml : persistance activée Prometheus: 20Gi sur nfs, Grafana: 2Gi sur nfs Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
727d7351eb
commit
655ca4dc8c
4 changed files with 77 additions and 3 deletions
22
k8s/apps-of-apps/apps/nfs-provisioner.yaml
Normal file
22
k8s/apps-of-apps/apps/nfs-provisioner.yaml
Normal file
|
|
@ -0,0 +1,22 @@
|
||||||
|
apiVersion: argoproj.io/v1alpha1
|
||||||
|
kind: Application
|
||||||
|
metadata:
|
||||||
|
name: nfs-provisioner
|
||||||
|
namespace: argocd
|
||||||
|
finalizers:
|
||||||
|
- resources-finalizer.argocd.argoproj.io
|
||||||
|
spec:
|
||||||
|
project: default
|
||||||
|
source:
|
||||||
|
repoURL: git@github.com:Alkatrazz24/Funk-lab.git
|
||||||
|
targetRevision: main
|
||||||
|
path: k8s/infra/nfs-provisioner
|
||||||
|
destination:
|
||||||
|
server: https://kubernetes.default.svc
|
||||||
|
namespace: nfs-provisioner
|
||||||
|
syncPolicy:
|
||||||
|
automated:
|
||||||
|
prune: true
|
||||||
|
selfHeal: true
|
||||||
|
syncOptions:
|
||||||
|
- CreateNamespace=true
|
||||||
|
|
@ -15,7 +15,9 @@ grafana:
|
||||||
limits:
|
limits:
|
||||||
memory: 256Mi
|
memory: 256Mi
|
||||||
persistence:
|
persistence:
|
||||||
enabled: false
|
enabled: true
|
||||||
|
storageClassName: nfs
|
||||||
|
size: 2Gi
|
||||||
|
|
||||||
prometheus:
|
prometheus:
|
||||||
prometheusSpec:
|
prometheusSpec:
|
||||||
|
|
@ -27,8 +29,14 @@ prometheus:
|
||||||
memory: 512Mi
|
memory: 512Mi
|
||||||
limits:
|
limits:
|
||||||
memory: 1Gi
|
memory: 1Gi
|
||||||
# Pas de StorageClass encore — emptyDir implicite (éphémère)
|
storageSpec:
|
||||||
# À remplacer par Longhorn une fois installé
|
volumeClaimTemplate:
|
||||||
|
spec:
|
||||||
|
storageClassName: nfs
|
||||||
|
accessModes: ["ReadWriteOnce"]
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
storage: 20Gi
|
||||||
|
|
||||||
# Scrape des nœuds hors cluster (storage-01, gpu-01)
|
# Scrape des nœuds hors cluster (storage-01, gpu-01)
|
||||||
additionalScrapeConfigs:
|
additionalScrapeConfigs:
|
||||||
|
|
|
||||||
28
k8s/infra/nfs-provisioner/helmrelease.yaml
Normal file
28
k8s/infra/nfs-provisioner/helmrelease.yaml
Normal file
|
|
@ -0,0 +1,28 @@
|
||||||
|
apiVersion: argoproj.io/v1alpha1
|
||||||
|
kind: Application
|
||||||
|
metadata:
|
||||||
|
name: nfs-provisioner
|
||||||
|
namespace: argocd
|
||||||
|
finalizers:
|
||||||
|
- resources-finalizer.argocd.argoproj.io
|
||||||
|
spec:
|
||||||
|
project: default
|
||||||
|
sources:
|
||||||
|
- repoURL: https://kubernetes-sigs.github.io/nfs-subdir-external-provisioner/
|
||||||
|
chart: nfs-subdir-external-provisioner
|
||||||
|
targetRevision: 4.0.18
|
||||||
|
helm:
|
||||||
|
valueFiles:
|
||||||
|
- $values/k8s/infra/nfs-provisioner/values.yaml
|
||||||
|
- repoURL: git@github.com:Alkatrazz24/Funk-lab.git
|
||||||
|
targetRevision: main
|
||||||
|
ref: values
|
||||||
|
destination:
|
||||||
|
server: https://kubernetes.default.svc
|
||||||
|
namespace: nfs-provisioner
|
||||||
|
syncPolicy:
|
||||||
|
automated:
|
||||||
|
prune: true
|
||||||
|
selfHeal: true
|
||||||
|
syncOptions:
|
||||||
|
- CreateNamespace=true
|
||||||
16
k8s/infra/nfs-provisioner/values.yaml
Normal file
16
k8s/infra/nfs-provisioner/values.yaml
Normal file
|
|
@ -0,0 +1,16 @@
|
||||||
|
nfs:
|
||||||
|
server: 192.168.10.1
|
||||||
|
path: /srv/data/nfs/k8s
|
||||||
|
|
||||||
|
storageClass:
|
||||||
|
name: nfs
|
||||||
|
defaultClass: true
|
||||||
|
reclaimPolicy: Retain
|
||||||
|
archiveOnDelete: false
|
||||||
|
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
cpu: 50m
|
||||||
|
memory: 64Mi
|
||||||
|
limits:
|
||||||
|
memory: 128Mi
|
||||||
Loading…
Add table
Add a link
Reference in a new issue