forked from blind-oracle/cortex-tenant
-
Notifications
You must be signed in to change notification settings - Fork 0
/
values.schema.json
588 lines (588 loc) · 16.9 KB
/
values.schema.json
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
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "A helm chart for cortex-tenant",
"description": "Prometheus remote write proxy which marks timeseries with a Cortex/Mimir tenant ID based on labels.",
"type": "object",
"required": [
"config"
],
"properties": {
"nameOverride": {
"type": [
"string",
"null"
],
"title": "Name override",
"description": "Overrides the chart name"
},
"fullnameOverride": {
"type": [
"string",
"null"
],
"title": "Fullname override",
"description": "Overrides the fullname of the chart"
},
"image": {
"type": "object",
"title": "Image",
"properties": {
"repository": {
"type": "string",
"title": "Repository",
"description": "Image repository"
},
"pullPolicy": {
"type": "string",
"title": "Pull policy",
"description": "Image pull policy",
"enum": [
"Always",
"Never",
"IfNotPresent"
]
},
"tag": {
"type": "string",
"title": "Tag",
"description": "Image tag"
}
}
},
"service": {
"type": "object",
"title": "Service",
"additionalProperties": false,
"properties": {
"type": {
"type": "string",
"title": "Type",
"description": "Service type",
"enum": [
"ClusterIP",
"NodePort",
"LoadBalancer"
]
},
"port": {
"type": "integer",
"title": "Port",
"description": "Service port",
"default": 8080
},
"targetPort": {
"type": "integer",
"title": "Target port",
"description": "Service target port",
"default": 8080
}
}
},
"replicas": {
"type": "integer",
"title": "Replicas",
"description": "Number of replicas",
"default": 1
},
"autoscaling": {
"type": "object",
"title": "Autoscaling",
"additionalProperties": false,
"properties": {
"enabled": {
"type": "boolean",
"title": "Enabled",
"description": "Enable autoscaling"
},
"minReplica": {
"type": "integer",
"title": "Min replicas",
"description": "Minimum number of replicas",
"default": 1
},
"maxReplica": {
"type": "integer",
"title": "Max replicas",
"description": "Maximum number of replicas",
"default": 3
},
"targetCPUUtilizationPercentage": {
"type": "integer",
"title": "Target CPU utilization percentage",
"description": "Target CPU utilization percentage",
"default": 60
},
"targetMemoryUtilizationPercentage": {
"type": "integer",
"title": "Target memory utilization percentage",
"description": "Target memory utilization percentage",
"default": 60
}
}
},
"envs": {
"type": "array",
"title": "Envs",
"description": "Environment variables",
"items": {
"type": "object",
"title": "Env",
"properties": {
"name": {
"type": "string",
"title": "Name",
"description": "Environment variable name"
},
"value": {
"type": [
"string",
"integer",
"boolean"
],
"title": "Value",
"description": "Environment variable value"
}
}
}
},
"config": {
"type": "object",
"title": "Config",
"description": "Configuration for the cortex-tenant",
"additionalProperties": false,
"properties": {
"listen": {
"type": "string",
"title": "Listen",
"description": "Where to listen for incoming write requests from Prometheus"
},
"listen_pprof": {
"type": "string",
"title": "Listen Profiling API",
"description": "Profiling API, leave empty to disable"
},
"target": {
"type": "string",
"title": "Target URL",
"description": "Where to send the modified requests (Cortex)",
"format": "uri"
},
"enable_ipv6": {
"type": "boolean",
"title": "Enable IPv6",
"description": "Whether to enable querying for IPv6 records"
},
"log_level": {
"type": "string",
"title": "Log level",
"enum": [
"debug",
"info",
"warn",
"error"
],
"default": "warn"
},
"timeout": {
"type": "string",
"title": "Timeout",
"description": "HTTP request timeout",
"format": "duration"
},
"timeout_shutdown": {
"type": "string",
"title": "Shutdown timeout",
"description": "Timeout to wait on shutdown to allow load balancers detect that we're going away",
"format": "duration"
},
"concurrency": {
"type": "integer",
"title": "Concurrency",
"description": "Max number of parallel incoming HTTP requests to handle",
"default": 1000
},
"metadata": {
"type": "boolean",
"title": "Metadata",
"description": "Whether to forward metrics metadata from Prometheus to Cortex"
},
"log_response_errors": {
"type": "boolean",
"title": "Log response errors",
"description": "If true response codes from metrics backend will be logged to stdout"
},
"max_connection_duration": {
"type": "string",
"title": "Max Connection Duration",
"description": "Maximum duration to keep outgoing connections alive (to Cortex/Mimir)",
"format": "duration"
},
"auth": {
"type": "object",
"title": "Authentication",
"properties": {
"enabled": {
"type": "boolean",
"title": "Enabled",
"description": "Egress HTTP basic auth -> add `Authentication` header to outgoing requests",
"default": false
},
"username": {
"type": [
"string",
"null"
],
"title": "Username",
"description": "Username"
},
"password": {
"type": [
"string",
"null"
],
"title": "Password",
"description": "Password"
},
"existingSecret": {
"type": [
"string",
"null"
],
"title": "Existing Secret",
"description": "Secret should pass the `CT_AUTH_EGRESS_USERNAME` and `CT_AUTH_EGRESS_PASSWORD` env variables"
}
}
},
"tenant": {
"type": "object",
"title": "Tenant configuration",
"properties": {
"label": {
"type": "string",
"title": "Label",
"description": "Which label to look for the tenant information",
"default": "tenant"
},
"label_list": {
"type": "array",
"title": "LabelList",
"description": "List of labels examined for tenant information. If set takes precedent over `label`",
"items": {
"type": "string",
"title": "LabelListItems",
"default": ""
}
},
"prefix": {
"type": "string",
"title": "Prefix",
"description": "Optional hard-coded prefix with delimeter for all tenant values"
},
"prefix_prefer_source": {
"type": "boolean",
"title": "Prefix Prefer Source",
"description": "If true will use the tenant ID of the inbound request as the prefix of the new tenant id.",
"default": false
},
"label_remove": {
"type": "boolean",
"title": "Label Remove",
"description": "Whether to remove the tenant label from the request",
"default": false
},
"header": {
"type": "string",
"title": "Header",
"description": "To which header to add the tenant ID",
"default": "X-Scope-OrgID"
},
"default": {
"type": "string",
"title": "Default",
"description": "Which tenant ID to use if the label is missing in any of the timeseries",
"default": "cortex-tenant-default"
},
"accept_all": {
"type": "boolean",
"title": "Accept All",
"description": "Enable if you want all metrics from Prometheus to be accepted with a 204 HTTP code",
"default": false
}
}
}
}
},
"resources": {
"type": "object",
"title": "Resources",
"description": "Resource limits and requests",
"properties": {
"limits": {
"type": "object",
"title": "Limits",
"description": "Resource limits",
"properties": {
"memory": {
"type": [
"string",
"integer",
"null"
],
"title": "Memory",
"description": "Maximum memory limit"
},
"cpu": {
"type": [
"string",
"integer",
"null"
],
"title": "CPU",
"description": "Maximum CPU limit"
}
}
},
"requests": {
"type": "object",
"title": "Requests",
"description": "Resource requests",
"properties": {
"cpu": {
"type": [
"string",
"integer",
"null"
],
"title": "CPU",
"description": "CPU request"
},
"memory": {
"type": [
"string",
"integer",
"null"
],
"title": "Memory",
"description": "Memory request"
}
}
}
}
},
"podDisruptionBudget": {
"type": "object",
"title": "Pod Disruption Budget",
"properties": {
"enabled": {
"type": "boolean",
"title": "Enabled",
"description": "Whether pod disruption budget is enabled"
},
"minAvailable": {
"type": [
"integer",
"string"
],
"title": "Minimum Available",
"description": "Minimum number of available pods during disruption. Also may be a percentage"
},
"maxUnavailable": {
"type": [
"integer",
"string"
],
"title": "Maximum Unavailable",
"description": "Maximum number of unavailable pods during disruption. Also may be a percentage"
}
}
},
"annotations": {
"type": "object",
"title": "Annotations",
"description": "Annotations for the deployment"
},
"podAnnotations": {
"type": "object",
"title": "Pod Annotations",
"description": "Annotations for the pods"
},
"podSecurityContext": {
"type": "object",
"title": "Pod Security Context",
"description": "Security context for the pods"
},
"securityContext": {
"type": "object",
"title": "Security Context",
"description": "Security context"
},
"nodeSelector": {
"type": "object",
"title": "Node Selector"
},
"tolerations": {
"type": "array",
"title": "Tolerations"
},
"affinity": {
"type": "object",
"title": "Affinity"
},
"podTopologySpreadConstraints": {
"type": "array",
"title": "Pod Topology Spread Constraints"
},
"serviceMonitor": {
"type": "object",
"title": "Service Monitor",
"description": "Service monitor",
"properties": {
"enabled": {
"type": "boolean",
"title": "Enabled",
"description": "Whether service monitor is enabled",
"default": false
},
"namespace": {
"type": [
"string",
"null"
],
"title": "Namespace",
"description": "Alternative namespace for ServiceMonitor resources"
},
"targetPort": {
"type": "integer",
"title": "Target Port",
"description": "Service targetPort",
"default": 9090
},
"namespaceSelector": {
"type": "object",
"title": "Namespace Selector",
"description": "Namespace selector for ServiceMonitor resources"
},
"annotations": {
"type": "object",
"title": "Annotations",
"description": "Annotations for the service monitor"
},
"labels": {
"type": "object",
"title": "Labels",
"description": "Additional ServiceMonitor labels"
},
"interval": {
"type": [
"string",
"null"
],
"title": "Interval",
"description": "ServiceMonitor scrape interval",
"format": "duration"
},
"scrapeTimeout": {
"type": [
"string",
"null"
],
"title": "Scrape Timeout",
"description": "ServiceMonitor scrape timeout in Go duration format (e.g. 15s)",
"format": "duration"
},
"relabelings": {
"type": "array",
"title": "Relabelings",
"description": "ServiceMonitor relabel configs to apply to samples before scraping"
},
"metricRelabelings": {
"type": "array",
"title": "Metric Relabelings",
"description": "ServiceMonitor relabel configs to apply to samples as the last"
},
"targetLabels": {
"type": "array",
"title": "Target Labels",
"description": "ServiceMonitor will add labels from the service to the Prometheus metric"
},
"scheme": {
"type": "string",
"title": "Scheme",
"description": "ServiceMonitor will use http by default, but you can pick https as well",
"default": "http"
},
"tlsConfig": {
"type": [
"object",
"null"
],
"title": "TLS Config"
},
"prometheusRule": {
"type": "object",
"title": "Prometheus Rule",
"properties": {
"enabled": {
"type": "boolean",
"title": "Enabled"
},
"additionalLabels": {
"type": "object",
"title": "Additional Labels"
},
"rules": {
"type": "array",
"title": "Rules"
}
}
}
}
},
"livenessProbe": {
"$ref": "#/definitions/probe",
"title": "Liveness Probe"
},
"readinessProbe": {
"$ref": "#/definitions/probe",
"title": "Readiness Probe"
}
},
"definitions": {
"probe": {
"type": "object",
"additionalProperties": false,
"properties": {
"enabled": {
"type": "boolean",
"title": "Enabled",
"description": "Enable the probe"
},
"initialDelaySeconds": {
"type": "integer",
"title": "Initial Delay Seconds",
"description": "Number of seconds after the container has started before liveness or readiness probes are initiated"
},
"timeoutSeconds": {
"type": "integer",
"title": "Timeout Seconds",
"description": "Number of seconds after which the probe times out"
},
"periodSeconds": {
"type": "integer",
"title": "Period Seconds",
"description": "How often (in seconds) to perform the probe"
},
"successThreshold": {
"type": "integer",
"title": "Success Threshold",
"description": "Minimum consecutive successes for the probe to be considered successful after having failed"
},
"failureThreshold": {
"type": "integer",
"title": "Failure Threshold",
"description": "Minimum consecutive failures for the probe to be considered failed after having succeeded"
}
}
}
}
}