-
Notifications
You must be signed in to change notification settings - Fork 179
/
Copy paththanos-query-frontend-deployment.yaml
137 lines (137 loc) · 4.33 KB
/
thanos-query-frontend-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
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app.kubernetes.io/component: query-cache
app.kubernetes.io/instance: thanos-query-frontend
app.kubernetes.io/name: thanos-query-frontend
app.kubernetes.io/version: v0.30.2
name: thanos-query-frontend
namespace: thanos
spec:
replicas: 1
selector:
matchLabels:
app.kubernetes.io/component: query-cache
app.kubernetes.io/instance: thanos-query-frontend
app.kubernetes.io/name: thanos-query-frontend
template:
metadata:
labels:
app.kubernetes.io/component: query-cache
app.kubernetes.io/instance: thanos-query-frontend
app.kubernetes.io/name: thanos-query-frontend
app.kubernetes.io/version: v0.30.2
spec:
affinity:
podAntiAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- podAffinityTerm:
labelSelector:
matchExpressions:
- key: app.kubernetes.io/name
operator: In
values:
- thanos-query-frontend
namespaces:
- thanos
topologyKey: kubernetes.io/hostname
weight: 100
containers:
- args:
- query-frontend
- --log.level=info
- --log.format=logfmt
- --query-frontend.compress-responses
- --http-address=0.0.0.0:9090
- --query-frontend.downstream-url=http://thanos-query.thanos.svc.cluster.local.:9090
- --query-range.split-interval=12h
- --labels.split-interval=12h
- --query-range.max-retries-per-request=10
- --labels.max-retries-per-request=10
- --query-frontend.log-queries-longer-than=10s
- |-
--query-range.response-cache-config="config":
"addresses":
- "dnssrv+_client._tcp.<MEMCACHED_SERVICE>.thanos.svc.cluster.local"
"dns_provider_update_interval": "10s"
"max_async_buffer_size": 10000
"max_async_concurrency": 20
"max_get_multi_batch_size": 0
"max_get_multi_concurrency": 100
"max_idle_connections": 100
"timeout": "500ms"
"type": "memcached"
- |-
--labels.response-cache-config="config":
"addresses":
- "dnssrv+_client._tcp.<MEMCACHED_SERVICE>.thanos.svc.cluster.local"
"dns_provider_update_interval": "10s"
"max_async_buffer_size": 10000
"max_async_concurrency": 20
"max_get_multi_batch_size": 0
"max_get_multi_concurrency": 100
"max_idle_connections": 100
"timeout": "500ms"
"type": "memcached"
- |-
--tracing.config="config":
"sampler_param": 2
"sampler_type": "ratelimiting"
"service_name": "thanos-query-frontend"
"type": "JAEGER"
env:
- name: HOST_IP_ADDRESS
valueFrom:
fieldRef:
fieldPath: status.hostIP
image: quay.io/thanos/thanos:v0.30.2
imagePullPolicy: IfNotPresent
livenessProbe:
failureThreshold: 4
httpGet:
path: /-/healthy
port: 9090
scheme: HTTP
periodSeconds: 30
name: thanos-query-frontend
ports:
- containerPort: 9090
name: http
readinessProbe:
failureThreshold: 20
httpGet:
path: /-/ready
port: 9090
scheme: HTTP
periodSeconds: 5
resources:
limits:
cpu: 0.42
memory: 420Mi
requests:
cpu: 0.123
memory: 123Mi
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL
readOnlyRootFilesystem: true
runAsGroup: 65532
runAsNonRoot: true
runAsUser: 65534
seccompProfile:
type: RuntimeDefault
terminationMessagePolicy: FallbackToLogsOnError
nodeSelector:
kubernetes.io/os: linux
securityContext:
fsGroup: 65534
runAsGroup: 65532
runAsNonRoot: true
runAsUser: 65534
seccompProfile:
type: RuntimeDefault
serviceAccountName: thanos-query-frontend
terminationGracePeriodSeconds: 120