47 lines
1.2 KiB
YAML
47 lines
1.2 KiB
YAML
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: prometheus
|
|
spec:
|
|
replicas: 1
|
|
selector:
|
|
matchLabels:
|
|
app: prometheus
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: prometheus
|
|
spec:
|
|
serviceAccountName: prometheus
|
|
nodeSelector:
|
|
role: ziffeldogip
|
|
containers:
|
|
- name: prometheus
|
|
image: prom/prometheus:v2.52.0
|
|
args:
|
|
- --config.file=/etc/prometheus/prometheus.yml
|
|
- --storage.tsdb.path=/prometheus
|
|
- --storage.tsdb.retention.time=7d
|
|
- --web.enable-lifecycle
|
|
ports:
|
|
- containerPort: 9090
|
|
volumeMounts:
|
|
- name: prometheus-config
|
|
mountPath: /etc/prometheus
|
|
- name: prometheus-data
|
|
mountPath: /prometheus
|
|
resources:
|
|
requests:
|
|
memory: "256Mi"
|
|
cpu: "200m"
|
|
limits:
|
|
memory: "1Gi"
|
|
cpu: "500m"
|
|
volumes:
|
|
- name: prometheus-config
|
|
configMap:
|
|
name: prometheus-config
|
|
- name: prometheus-data
|
|
persistentVolumeClaim:
|
|
claimName: prometheus-data-pvc
|