theshire/kubernetes/apps/observability/smartctl-exporter/app/helmrelease.yaml

120 lines
3.5 KiB
YAML
Raw Normal View History

2024-10-27 19:10:17 -05:00
---
2024-10-27 23:03:14 -05:00
# yaml-language-server: $schema=https://raw.githubusercontent.com/bjw-s/helm-charts/main/charts/other/app-template/schemas/helmrelease-helm-v2.schema.json
2024-10-27 19:10:17 -05:00
apiVersion: helm.toolkit.fluxcd.io/v2
kind: HelmRelease
metadata:
name: &app smartctl-exporter
spec:
interval: 30m
chart:
spec:
2024-10-27 23:03:14 -05:00
chart: app-template
version: 3.5.1
2024-10-27 19:10:17 -05:00
sourceRef:
kind: HelmRepository
2024-10-27 23:03:14 -05:00
name: bjw-s
2024-10-27 19:10:17 -05:00
namespace: flux-system
values:
2024-10-27 23:03:14 -05:00
controllers:
smartctl-exporter:
type: daemonset
2024-10-27 23:18:03 -05:00
pod:
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: kubernetes.io/hostname
operator: NotIn
values:
- gandalf-01
- shadowfax-01
2024-10-27 23:03:14 -05:00
containers:
app:
2024-10-27 23:34:12 -05:00
image: &image
2024-10-27 23:03:14 -05:00
repository: quay.io/prometheuscommunity/smartctl-exporter
tag: v0.12.0
args:
- --smartctl.path=/usr/sbin/smartctl
- --smartctl.interval=120s
- --web.listen-address=0.0.0.0:9633
- --web.telemetry-path=/metrics
2024-10-27 23:34:12 -05:00
securityContext: &securityContext
2024-10-27 23:03:14 -05:00
privileged: true
runAsUser: 0
probes:
liveness: &probes
enabled: true
custom: true
spec:
httpGet:
port: &port 9633
2024-10-27 23:03:14 -05:00
path: /
readiness: *probes
2024-10-27 23:34:12 -05:00
smartctl-exporter-vms:
type: daemonset
pod:
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: kubernetes.io/hostname
operator: In
values:
- gandalf-01
- shadowfax-01
containers:
app:
image: *image
args:
- --smartctl.path=/usr/sbin/smartctl
- --smartctl.interval=120s
- --web.listen-address=0.0.0.0:9633
- --web.telemetry-path=/metrics
- --smartctl.device=/dev/nvme0
securityContext: *securityContext
probes:
liveness: *probes
readiness: *probes
service:
smartctl-exporter:
controller: smartctl-exporter
ports:
exporter:
port: *port
smartctl-exporter-vms:
controller: smartctl-exporter-vms
ports:
exporter:
port: *port
2024-10-27 23:03:14 -05:00
persistence:
dev:
type: hostPath
hostPath: /dev
hostPathType: Directory
globalMounts:
- path: /host/dev
readOnly: true
serviceMonitor:
smartctl-exporter:
serviceName: smartctl-exporter
endpoints:
- port: exporter
scheme: http
path: /metrics
interval: 1m
scrapeTimeout: 10s
smartctl-exporter-vms:
selector:
matchLabels:
app.kubernetes.io/instance: smartctl-exporter
app.kubernetes.io/name: smartctl-exporter
app.kubernetes.io/service: smartctl-exporter-smartctl-exporter-vms
endpoints:
- port: exporter
scheme: http
path: /metrics
interval: 1m
scrapeTimeout: 10s