exportarr/examples/kubernetes/lidarr-exporter.yaml
2023-08-22 12:34:03 -04:00

100 lines
2.5 KiB
YAML

---
apiVersion: v1
kind: Service
metadata:
name: lidarr-exporter
namespace: monitoring
labels:
app.kubernetes.io/name: lidarr-exporter
app.kubernetes.io/instance: lidarr-exporter
spec:
clusterIP: None
selector:
app.kubernetes.io/name: lidarr-exporter
app.kubernetes.io/instance: lidarr-exporter
ports:
- name: monitoring
port: 9707
---
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
name: lidarr-exporter
namespace: monitoring
labels:
app.kubernetes.io/name: lidarr-exporter
app.kubernetes.io/instance: lidarr-exporter
spec:
selector:
matchLabels:
app.kubernetes.io/name: lidarr-exporter
app.kubernetes.io/instance: lidarr-exporter
endpoints:
- port: monitoring
interval: 4m
scrapeTimeout: 90s
path: /metrics
---
kind: Deployment
apiVersion: apps/v1
metadata:
name: lidarr-exporter
namespace: monitoring
labels:
app.kubernetes.io/name: lidarr-exporter
app.kubernetes.io/instance: lidarr-exporter
spec:
replicas: 1
revisionHistoryLimit: 3
selector:
matchLabels:
app.kubernetes.io/name: lidarr-exporter
app.kubernetes.io/instance: lidarr-exporter
template:
metadata:
labels:
app.kubernetes.io/name: lidarr-exporter
app.kubernetes.io/instance: lidarr-exporter
annotations:
prometheus.io/scrape: "true"
prometheus.io/port: "monitoring"
spec:
containers:
- name: lidarr-exporter
image: ghcr.io/onedr0p/exportarr:v1.5.3
imagePullPolicy: IfNotPresent
args:
- lidarr
env:
- name: PORT
value: "9707"
- name: URL
value: "http://lidarr.default.svc.cluster.local:8686"
- name: APIKEY
valueFrom:
secretKeyRef:
name: lidarr-exporter
key: api-key
ports:
- name: monitoring
containerPort: 9707
livenessProbe:
httpGet:
path: /healthz
port: monitoring
failureThreshold: 5
periodSeconds: 10
readinessProbe:
httpGet:
path: /healthz
port: monitoring
failureThreshold: 5
periodSeconds: 10
resources:
requests:
cpu: 100m
memory: 64Mi
limits:
cpu: 500m
memory: 256Mi