-
Notifications
You must be signed in to change notification settings - Fork 354
/
deployment.yaml
278 lines (278 loc) · 10.2 KB
/
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app.kubernetes.io/component: query-layer
app.kubernetes.io/instance: thanos-querier
app.kubernetes.io/managed-by: cluster-monitoring-operator
app.kubernetes.io/name: thanos-query
app.kubernetes.io/part-of: openshift-monitoring
app.kubernetes.io/version: 0.30.2
name: thanos-querier
namespace: openshift-monitoring
spec:
replicas: 2
selector:
matchLabels:
app.kubernetes.io/component: query-layer
app.kubernetes.io/instance: thanos-querier
app.kubernetes.io/name: thanos-query
app.kubernetes.io/part-of: openshift-monitoring
strategy:
rollingUpdate:
maxUnavailable: 1
template:
metadata:
annotations:
target.workload.openshift.io/management: '{"effect": "PreferredDuringScheduling"}'
labels:
app.kubernetes.io/component: query-layer
app.kubernetes.io/instance: thanos-querier
app.kubernetes.io/managed-by: cluster-monitoring-operator
app.kubernetes.io/name: thanos-query
app.kubernetes.io/part-of: openshift-monitoring
app.kubernetes.io/version: 0.30.2
spec:
affinity:
podAntiAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchLabels:
app.kubernetes.io/component: query-layer
app.kubernetes.io/instance: thanos-querier
app.kubernetes.io/name: thanos-query
app.kubernetes.io/part-of: openshift-monitoring
topologyKey: kubernetes.io/hostname
containers:
- args:
- query
- --grpc-address=127.0.0.1:10901
- --http-address=127.0.0.1:9090
- --log.format=logfmt
- --query.replica-label=prometheus_replica
- --query.replica-label=thanos_ruler_replica
- --store=dnssrv+_grpc._tcp.prometheus-operated.openshift-monitoring.svc.cluster.local
- --query.auto-downsampling
- --store.sd-dns-resolver=miekgdns
- --grpc-client-tls-secure
- --grpc-client-tls-cert=/etc/tls/grpc/client.crt
- --grpc-client-tls-key=/etc/tls/grpc/client.key
- --grpc-client-tls-ca=/etc/tls/grpc/ca.crt
- --grpc-client-server-name=prometheus-grpc
- --rule=dnssrv+_grpc._tcp.prometheus-operated.openshift-monitoring.svc.cluster.local
- --target=dnssrv+_grpc._tcp.prometheus-operated.openshift-monitoring.svc.cluster.local
env:
- name: HOST_IP_ADDRESS
valueFrom:
fieldRef:
fieldPath: status.hostIP
image: quay.io/thanos/thanos:v0.30.2
imagePullPolicy: IfNotPresent
name: thanos-query
ports:
- containerPort: 9090
name: http
resources:
requests:
cpu: 10m
memory: 12Mi
terminationMessagePolicy: FallbackToLogsOnError
volumeMounts:
- mountPath: /etc/tls/grpc
name: secret-grpc-tls
- args:
- -provider=openshift
- -https-address=:9091
- -http-address=
- -email-domain=*
- -upstream=http://localhost:9090
- -openshift-service-account=thanos-querier
- '-openshift-sar={"resource": "namespaces", "verb": "get"}'
- '-openshift-delegate-urls={"/": {"resource": "namespaces", "verb": "get"}}'
- -tls-cert=/etc/tls/private/tls.crt
- -tls-key=/etc/tls/private/tls.key
- -client-secret-file=/var/run/secrets/kubernetes.io/serviceaccount/token
- -cookie-secret-file=/etc/proxy/secrets/session_secret
- -openshift-ca=/etc/pki/tls/cert.pem
- -openshift-ca=/var/run/secrets/kubernetes.io/serviceaccount/ca.crt
- -bypass-auth-for=^/-/(healthy|ready)$
env:
- name: HTTP_PROXY
value: ""
- name: HTTPS_PROXY
value: ""
- name: NO_PROXY
value: ""
image: quay.io/openshift/oauth-proxy:latest
livenessProbe:
failureThreshold: 4
httpGet:
path: /-/healthy
port: 9091
scheme: HTTPS
initialDelaySeconds: 5
periodSeconds: 30
name: oauth-proxy
ports:
- containerPort: 9091
name: web
readinessProbe:
failureThreshold: 20
httpGet:
path: /-/ready
port: 9091
scheme: HTTPS
initialDelaySeconds: 5
periodSeconds: 5
resources:
requests:
cpu: 1m
memory: 20Mi
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL
terminationMessagePolicy: FallbackToLogsOnError
volumeMounts:
- mountPath: /etc/tls/private
name: secret-thanos-querier-tls
- mountPath: /etc/proxy/secrets
name: secret-thanos-querier-oauth-cookie
- args:
- --secure-listen-address=0.0.0.0:9092
- --upstream=http://127.0.0.1:9095
- --config-file=/etc/kube-rbac-proxy/config.yaml
- --tls-cert-file=/etc/tls/private/tls.crt
- --tls-private-key-file=/etc/tls/private/tls.key
- --tls-cipher-suites=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305,TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305
- --logtostderr=true
- --allow-paths=/api/v1/query,/api/v1/query_range,/api/v1/labels,/api/v1/label/*/values,/api/v1/series
image: quay.io/brancz/kube-rbac-proxy:v0.14.1
name: kube-rbac-proxy
ports:
- containerPort: 9092
name: tenancy
resources:
requests:
cpu: 1m
memory: 15Mi
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL
terminationMessagePolicy: FallbackToLogsOnError
volumeMounts:
- mountPath: /etc/tls/private
name: secret-thanos-querier-tls
- mountPath: /etc/kube-rbac-proxy
name: secret-thanos-querier-kube-rbac-proxy
- args:
- --insecure-listen-address=127.0.0.1:9095
- --upstream=http://127.0.0.1:9090
- --label=namespace
- --enable-label-apis
- --error-on-replace
image: quay.io/prometheuscommunity/prom-label-proxy:v0.6.0
name: prom-label-proxy
resources:
requests:
cpu: 1m
memory: 15Mi
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL
terminationMessagePolicy: FallbackToLogsOnError
- args:
- --secure-listen-address=0.0.0.0:9093
- --upstream=http://127.0.0.1:9095
- --config-file=/etc/kube-rbac-proxy/config.yaml
- --tls-cert-file=/etc/tls/private/tls.crt
- --tls-private-key-file=/etc/tls/private/tls.key
- --tls-cipher-suites=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305,TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305
- --logtostderr=true
- --allow-paths=/api/v1/rules
image: quay.io/brancz/kube-rbac-proxy:v0.14.1
name: kube-rbac-proxy-rules
ports:
- containerPort: 9093
name: tenancy-rules
resources:
requests:
cpu: 1m
memory: 15Mi
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL
terminationMessagePolicy: FallbackToLogsOnError
volumeMounts:
- mountPath: /etc/tls/private
name: secret-thanos-querier-tls
- mountPath: /etc/kube-rbac-proxy
name: secret-thanos-querier-kube-rbac-proxy-rules
- args:
- --secure-listen-address=0.0.0.0:9094
- --upstream=http://127.0.0.1:9090
- --config-file=/etc/kube-rbac-proxy/config.yaml
- --tls-cert-file=/etc/tls/private/tls.crt
- --tls-private-key-file=/etc/tls/private/tls.key
- --tls-cipher-suites=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305,TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305
- --client-ca-file=/etc/tls/client/client-ca.crt
- --logtostderr=true
- --allow-paths=/metrics
image: quay.io/brancz/kube-rbac-proxy:v0.14.1
name: kube-rbac-proxy-metrics
ports:
- containerPort: 9094
name: metrics
resources:
requests:
cpu: 1m
memory: 15Mi
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL
terminationMessagePolicy: FallbackToLogsOnError
volumeMounts:
- mountPath: /etc/tls/private
name: secret-thanos-querier-tls
- mountPath: /etc/kube-rbac-proxy
name: secret-thanos-querier-kube-rbac-proxy-metrics
- mountPath: /etc/tls/client
name: metrics-client-ca
readOnly: true
nodeSelector:
kubernetes.io/os: linux
priorityClassName: system-cluster-critical
securityContext:
runAsNonRoot: true
seccompProfile:
type: RuntimeDefault
serviceAccountName: thanos-querier
terminationGracePeriodSeconds: 120
volumes:
- name: secret-thanos-querier-tls
secret:
secretName: thanos-querier-tls
- name: secret-thanos-querier-oauth-cookie
secret:
secretName: thanos-querier-oauth-cookie
- name: secret-thanos-querier-kube-rbac-proxy
secret:
secretName: thanos-querier-kube-rbac-proxy
- name: secret-thanos-querier-kube-rbac-proxy-rules
secret:
secretName: thanos-querier-kube-rbac-proxy-rules
- name: secret-thanos-querier-kube-rbac-proxy-metrics
secret:
secretName: thanos-querier-kube-rbac-proxy-metrics
- configMap:
name: metrics-client-ca
name: metrics-client-ca