2022-09-14 22:17:21 +00:00
|
|
|
apiVersion: apps/v1
|
|
|
|
kind: Deployment
|
|
|
|
metadata:
|
|
|
|
name: prometheus
|
|
|
|
namespace: monitoring
|
|
|
|
labels:
|
|
|
|
app: prometheus
|
|
|
|
spec:
|
|
|
|
replicas: 1
|
|
|
|
selector:
|
|
|
|
matchLabels:
|
|
|
|
app: prometheus
|
|
|
|
template:
|
|
|
|
metadata:
|
|
|
|
labels:
|
|
|
|
app: prometheus
|
|
|
|
spec:
|
|
|
|
containers:
|
|
|
|
- name: prometheus
|
|
|
|
image: prom/prometheus
|
|
|
|
args:
|
|
|
|
- "--storage.tsdb.retention.time=12h"
|
|
|
|
- "--config.file=/etc/prometheus/prometheus.yml"
|
|
|
|
- "--storage.tsdb.path=/prometheus/"
|
|
|
|
ports:
|
|
|
|
- containerPort: 9090
|
|
|
|
resources:
|
|
|
|
requests:
|
|
|
|
cpu: 500m
|
|
|
|
memory: 500M
|
|
|
|
limits:
|
|
|
|
cpu: 1
|
|
|
|
memory: 1Gi
|
|
|
|
volumeMounts:
|
|
|
|
- name: prometheus-config-volume
|
|
|
|
mountPath: /etc/prometheus
|
|
|
|
- name: prometheus-storage-volume
|
|
|
|
mountPath: /prometheus/
|
|
|
|
volumes:
|
|
|
|
- name: prometheus-config-volume
|
|
|
|
configMap:
|
|
|
|
defaultMode: 420
|
|
|
|
name: prometheus-server-conf
|
|
|
|
- name: prometheus-storage-volume
|
|
|
|
emptyDir: {}
|
2022-09-21 16:17:32 +00:00
|
|
|
nodeName: slave-1
|