add node exporter

This commit is contained in:
Joseph Hanson 2024-08-17 10:58:06 -05:00
parent 7ff3f82d99
commit 1390b48039
Signed by: jahanson
SSH key fingerprint: SHA256:vy6dKBECV522aPAwklFM3ReKAVB086rT3oWwiuiFG7o
4 changed files with 83 additions and 0 deletions

View file

@ -6,6 +6,7 @@ resources:
# Pre Flux-Kustomizations
- ./namespace.yaml
# Flux-Kustomizations
- ./node-exporter/ks.yaml
- ./gatus/ks.yaml
# - ./smartctl-exporter/ks.yaml
# - ./victoria-metrics/ks.yaml

View file

@ -0,0 +1,57 @@
---
# yaml-language-server: $schema=https://ks.hsn.dev/helm.toolkit.fluxcd.io/helmrelease_v2.json
apiVersion: helm.toolkit.fluxcd.io/v2
kind: HelmRelease
metadata:
name: node-exporter
spec:
interval: 30m
chart:
spec:
chart: prometheus-node-exporter
version: 4.38.0
sourceRef:
kind: HelmRepository
name: prometheus-community
namespace: flux-system
interval: 30m
values:
fullnameOverride: node-exporter
image:
registry: quay.io
repository: prometheus/node-exporter
prometheus:
monitor:
enabled: true
jobLabel: app.kubernetes.io/instance
relabelings:
- action: replace
regex: (.*)
replacement: $1
sourceLabels:
- __meta_kubernetes_pod_node_name
targetLabel: kubernetes_node
- action: replace
regex: (.*)
replacement: $1
sourceLabels:
- __meta_kubernetes_pod_node_name
targetLabel: nodename
- action: replace
regex: (.*)
replacement: $1.bjw-s.internal:9100
sourceLabels:
- kubernetes_node
targetLabel: instance
resources:
requests:
cpu: 23m
memory: 64M
limits:
memory: 64M
hostNetwork: 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,19 @@
---
# yaml-language-server: $schema=https://raw.githubusercontent.com/fluxcd-community/flux2-schemas/main/kustomization-kustomize-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
interval: 10m
path: "./kubernetes/apps/observability/node-exporter/app"
prune: true
sourceRef:
kind: GitRepository
name: homelab
wait: false