both service monitors and services added

This commit is contained in:
Joseph Hanson 2024-10-28 00:48:54 -05:00
parent 967dfc3556
commit 17243198ac
Signed by: jahanson
SSH key fingerprint: SHA256:vy6dKBECV522aPAwklFM3ReKAVB086rT3oWwiuiFG7o
2 changed files with 46 additions and 1 deletions

View file

@ -48,7 +48,7 @@ spec:
custom: true custom: true
spec: spec:
httpGet: httpGet:
port: 9633 port: &port 9633
path: / path: /
readiness: *probes readiness: *probes
smartctl-exporter-vms: smartctl-exporter-vms:
@ -77,6 +77,17 @@ spec:
probes: probes:
liveness: *probes liveness: *probes
readiness: *probes readiness: *probes
service:
smartctl-exporter:
controller: smartctl-exporter
ports:
exporter:
port: *port
smartctl-exporter-vms:
controller: smartctl-exporter-vms
ports:
exporter:
port: *port
persistence: persistence:
dev: dev:
type: hostPath type: hostPath
@ -85,3 +96,24 @@ spec:
globalMounts: globalMounts:
- path: /host/dev - path: /host/dev
readOnly: true 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

View file

@ -0,0 +1,13 @@
---
# yaml-language-server: $schema=https://ks.hsn.dev/monitoring.coreos.com/podmonitor_v1.json
apiVersion: monitoring.coreos.com/v1
kind: PodMonitor
metadata:
name: smartctl-exporter
spec:
namespaceSelector:
matchNames:
- observability
selector:
matchLabels:
app.kubernetes.io/name: smartctl-exporter