add node-exporter

This commit is contained in:
Joseph Hanson 2024-10-20 12:07:53 -05:00
parent d3692d298a
commit 6966e74fa6
Signed by: jahanson
SSH key fingerprint: SHA256:vy6dKBECV522aPAwklFM3ReKAVB086rT3oWwiuiFG7o
4 changed files with 71 additions and 0 deletions

View file

@ -8,6 +8,7 @@ resources:
# Flux-Kustomizations # Flux-Kustomizations
- ./alertmanager/ks.yaml - ./alertmanager/ks.yaml
- ./gatus/ks.yaml - ./gatus/ks.yaml
- ./node-exporter/ks.yaml
- ./prometheus-operator-crds/ks.yaml - ./prometheus-operator-crds/ks.yaml
- ./vector-agent/ks.yaml - ./vector-agent/ks.yaml
- ./vector-aggregator/ks.yaml - ./vector-aggregator/ks.yaml

View file

@ -0,0 +1,44 @@
---
# yaml-language-server: $schema=https://ks.hsn.dev/helm.toolkit.fluxcd.io/helmrelease_v2beta2.json
apiVersion: helm.toolkit.fluxcd.io/v2
kind: HelmRelease
metadata:
name: &app node-exporter
spec:
interval: 30m
chartRef:
kind: OCIRepository
name: prometheus-node-exporter
namespace: flux-system
driftDetection:
mode: enabled
install:
crds: CreateReplace
remediation:
retries: 3
upgrade:
cleanupOnFail: true
crds: CreateReplace
remediation:
retries: 3
values:
fullnameOverride: *app
podLabels:
jobLabel: node-exporter
releaseLabel: true
extraArgs:
- --collector.filesystem.mount-points-exclude=^/(dev|proc|sys|var/lib/docker/.+|var/lib/kubelet/.+)($|/)
- --collector.filesystem.fs-types-exclude=^(autofs|binfmt_misc|bpf|cgroup2?|configfs|debugfs|devpts|devtmpfs|fusectl|hugetlbfs|iso9660|mqueue|nsfs|overlay|proc|procfs|pstore|rpc_pipefs|securityfs|selinuxfs|squashfs|sysfs|tracefs)$
service:
portName: http-metrics
prometheus:
monitor:
enabled: true
jobLabel: jobLabel
attachMetadata:
node: true
relabelings:
- sourceLabels: [__meta_kubernetes_pod_node_name]
targetLabel: instance
rbac:
pspEnabled: false

View file

@ -0,0 +1,6 @@
---
# yaml-language-server: $schema=https://json.schemastore.org/kustomization
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- ./helmrelease.yaml

View file

@ -0,0 +1,20 @@
---
# yaml-language-server: $schema=https://ks.hsn.dev/kustomize.toolkit.fluxcd.io/kustomization_v1.json
apiVersion: kustomize.toolkit.fluxcd.io/v1
kind: Kustomization
metadata:
name: &app node-exporter
namespace: flux-system
spec:
targetNamespace: observability
commonMetadata:
labels:
app.kubernetes.io/name: *app
path: ./kubernetes/apps/observability/node-exporter/app
prune: true
sourceRef:
kind: GitRepository
name: theshire
wait: false
interval: 30m
retryInterval: 1m