-
Notifications
You must be signed in to change notification settings - Fork 1
/
prometheus-deployment.yaml
54 lines (53 loc) · 1.67 KB
/
prometheus-deployment.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
apiVersion: apps/v1
kind: Deployment
metadata:
name: prometheus-deployment
namespace: prometheus
labels:
app: prometheus-server
spec:
replicas: 1
selector:
matchLabels:
app: prometheus-server
template:
metadata:
labels:
app: prometheus-server
spec:
containers:
- name: prometheus
image: prom/prometheus:${PROMETHEUS_VER_TAG}
args:
- "--config.file=/etc/prometheus/prometheus.yml"
- "--storage.tsdb.path=/prometheus"
ports:
- containerPort: 9090
volumeMounts:
- name: prometheus-config-volume
mountPath: /etc/prometheus/
- name: prometheus-storage-volume
mountPath: /prometheus
- name: sidecar
image: gcr.io/stackdriver-prometheus/stackdriver-prometheus-sidecar:${SIDECAR_IMAGE_TAG}
imagePullPolicy: Always
args:
- --stackdriver.project-id=${GCP_PROJECT}
- --prometheus.wal-directory=${DATA_DIR}/wal
- --stackdriver.kubernetes.location=${GCP_LOCATION}
- --stackdriver.kubernetes.cluster-name=${KUBE_CLUSTER}
#- \"--stackdriver.generic.location=${GCP_LOCATION}\"
#- \"--stackdriver.generic.namespace=${KUBE_CLUSTER}\"
ports:
- name: sidecar
containerPort: 9091
volumeMounts:
- name: ${DATA_VOLUME}
mountPath: ${DATA_DIR}
volumes:
- name: prometheus-config-volume
configMap:
defaultMode: 420
name: prometheus-server-conf
- name: prometheus-storage-volume
emptyDir: {}