Files

63 lines
1.7 KiB
YAML
Raw Permalink Normal View History

2025-11-22 20:14:55 -06:00
apiVersion: apps/v1
kind: Deployment
metadata:
name: prometheus
labels:
app: prometheus
spec:
replicas: 1
strategy:
rollingUpdate:
maxSurge: 1
maxUnavailable: 1
type: RollingUpdate
selector:
matchLabels:
app: prometheus
template:
metadata:
labels:
app: prometheus
annotations:
prometheus.io/scrape: "true"
prometheus.io/port: "9090"
spec:
2025-11-22 21:22:51 -06:00
serviceAccountName: prometheus
2025-11-22 20:14:55 -06:00
containers:
- name: prometheus
image: prom/prometheus
args:
- "--storage.tsdb.path=/prometheus"
- "--config.file=/etc/prometheus/prometheus.yml"
ports:
- name: http
containerPort: 9090
volumeMounts:
- name: prometheus-config-values
2026-03-25 06:02:17 -05:00
mountPath: /etc/prometheus/prometheus.yml
subPath: prometheus.yml
- name: prometheus-alerts
mountPath: /etc/prometheus/alerts.yml
subPath: alerts.yml
2025-11-22 20:14:55 -06:00
- name: prometheus-storage-volume
mountPath: /prometheus
- name: restic-credentials
mountPath: /etc/prometheus/secrets/restic
readOnly: true
2025-11-22 20:14:55 -06:00
restartPolicy: Always
volumes:
- name: prometheus-config-values
configMap:
defaultMode: 420
name: prometheus-config
2026-03-25 06:02:17 -05:00
- name: prometheus-alerts
configMap:
defaultMode: 420
name: prometheus-alerts
2025-11-22 20:14:55 -06:00
- name: prometheus-storage-volume
persistentVolumeClaim:
claimName: prometheus-data
- name: restic-credentials
secret:
secretName: restic-credentials