1
- apiVersion : v1
2
- kind : ConfigMap
3
- metadata :
4
- name : data
5
- namespace : prombench-{{ .PR_NUMBER }}
6
- data :
7
- minio-config.yaml : |
8
- type: S3
9
- config:
10
- bucket: thanos-bucket
11
- endpoint: minio:9000
12
- access_key: ROOTNAME
13
- secret_key: CHANGEME123
14
- insecure: true
15
- ---
16
1
apiVersion : apps/v1
17
2
kind : Deployment
18
3
metadata :
49
34
runAsUser : 0
50
35
initContainers :
51
36
- name : prometheus-builder
52
- image : docker.io/prominfra/prometheus- builder:master
37
+ image : kushalshukla/ builder
53
38
imagePullPolicy : Always
54
39
env :
55
40
- name : PR_NUMBER
@@ -63,18 +48,20 @@ spec:
63
48
volumeMounts :
64
49
- name : prometheus-executable
65
50
mountPath : /prometheus-builder
51
+ - name : config
52
+ mountPath : /config
66
53
- name : data-downloader
67
- image : kushalshukla/writer:latest
68
- imagePullPolicy : Always
54
+ image : kushalshukla/writer
55
+ imagePullPolicy : Always
69
56
volumeMounts :
70
57
- name : instance-ssd
71
58
mountPath : /data
72
- - name : minio- config
73
- mountPath : /mnc
59
+ - name : config
60
+ mountPath : /mnc
74
61
args : [
75
62
" download" ,
76
63
" --tsdb-path=/data" ,
77
- " --objstore.config-file=/mnc/minio-config.yaml " ,
64
+ " --objstore.config-file=/mnc/objectconfig.yml " ,
78
65
" --key=gendata"
79
66
]
80
67
containers :
@@ -112,14 +99,14 @@ spec:
112
99
- name : config-volume
113
100
configMap :
114
101
name : prometheus-test
115
- - name : minio-config
116
- configMap :
117
- name : data
118
102
- name : instance-ssd
119
103
hostPath :
120
104
path : /mnt/disks/ssd0 # gke ssds
121
105
- name : prometheus-executable
122
106
emptyDir : {}
107
+ - name : config
108
+ hostPath :
109
+ path : /config-file
123
110
terminationGracePeriodSeconds : 300
124
111
nodeSelector :
125
112
node-name : prometheus-{{ .PR_NUMBER }}
@@ -176,11 +163,42 @@ spec:
176
163
- prometheus
177
164
securityContext :
178
165
runAsUser : 0
166
+ initContainers :
167
+ - name : git-fetcher
168
+ image : alpine/git
169
+ command :
170
+ - /bin/sh
171
+ - -c
172
+ - |
173
+ apk add --no-cache bash && \
174
+ git clone --depth 1 https://github.com/{{ .GITHUB_ORG }}/{{ .GITHUB_REPO }}.git /repo1 && \
175
+ cd /repo1 && \
176
+ git fetch origin pull/{{ .PR_NUMBER }}/head:pr-branch && \
177
+ git checkout pr-branch && \
178
+ cp objectconfig.yml /mnt/repo/objectconfig.yml && \
179
+ rm -rf /repo1
180
+ volumeMounts :
181
+ - name : config
182
+ mountPath : /mnt/repo
183
+ - name : data-downloader
184
+ image : kushalshukla/writer
185
+ imagePullPolicy : Always
186
+ volumeMounts :
187
+ - name : instance-ssd
188
+ mountPath : /data
189
+ - name : config
190
+ mountPath : /mnc
191
+ args : [
192
+ " download" ,
193
+ " --tsdb-path=/data" ,
194
+ " --objstore.config-file=/mnc/objectconfig.yml" ,
195
+ " --key=gendata"
196
+ ]
179
197
containers :
180
198
- name : prometheus
181
199
image : quay.io/prometheus/prometheus:{{ .RELEASE }}
182
200
imagePullPolicy : Always
183
- command : [ "/bin/prometheus" ]
201
+ command : [ "/bin/prometheus"]
184
202
args : [
185
203
" --web.external-url=http://{{ .DOMAIN_NAME }}/{{ .PR_NUMBER }}/prometheus-release" ,
186
204
" --storage.tsdb.path=/prometheus" ,
@@ -204,6 +222,9 @@ spec:
204
222
# /mnt is where GKE keeps it's SSD
205
223
# don't change this if you want Prometheus to take advantage of these local SSDs
206
224
path : /mnt/disks/ssd0
225
+ - name : config
226
+ hostPath :
227
+ path : /object-config
207
228
terminationGracePeriodSeconds : 300
208
229
nodeSelector :
209
230
node-name : prometheus-{{ .PR_NUMBER }}
0 commit comments