Files
home-cluster-ops/kubernetes/infrastructure/prometheus/app/deployment.yaml

52 lines
1.3 KiB
YAML

apiVersion: apps/v1
kind: Deployment
metadata:
name: prometheus
namespace: prometheus
labels:
app: prometheus
spec:
strategy:
rollingUpdate: null
type: Recreate
selector:
matchLabels:
app: prometheus
template:
metadata:
labels:
app: prometheus
spec:
securityContext:
runAsUser: 0
runAsGroup: 0
containers:
- name: prometheus
image: prom/prometheus:v2.53.0
args:
- "--storage.tsdb.retention.time=14d"
- "--config.file=/etc/prometheus/prometheus.yaml"
- "--storage.tsdb.path=/prometheus/"
ports:
- containerPort: 9090
resources:
requests:
cpu: 500m
memory: 500M
limits:
cpu: "1"
memory: 2Gi
volumeMounts:
- name: prometheus-config-volume
mountPath: /etc/prometheus/
- name: prometheus-storage-volume
mountPath: /prometheus/
volumes:
- name: prometheus-config-volume
hostPath:
path: /mnt/nfs/AppData/prometheus/conf
type: Directory
- name: prometheus-storage-volume
hostPath:
path: /mnt/nfs/AppData/prometheus/storage
type: Directory