-
Notifications
You must be signed in to change notification settings - Fork 458
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[targetallocator] PrometheusOperator CRD MVC #653
Changes from 24 commits
4a72ffb
626d002
b71d1f2
727493b
f6a1996
f12336d
d5c90ea
24275d0
0da5fa8
8a29f22
077c0c4
78161df
28fc0c9
bb21889
c18ac42
acc07c5
8b7d8bf
1b249ca
2f5e0b3
f665de5
e23a2c5
0a429a7
92a55d5
96cea47
45a0e84
7d3f036
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
# Target Allocator | ||
|
||
The TargetAllocator is an optional separately deployed component of an OpenTelemetry Collector setup, which is used to | ||
distribute targets of the PrometheusReceiver on all deployed Collector instances. | ||
|
||
# Design | ||
|
||
If the Allocator is activated, all Prometheus configurations will be transferred in a separate ConfigMap which get in | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Is it OTEL p8s receiver configuration or as well p8s CRs? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This applies to the configuration of the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is only referencing the OTEL p8s configuration. |
||
turn mounted to the Allocator. | ||
This configuration will be resolved to target configurations and then split across all OpenTelemetryCollector instances. | ||
|
||
TargetAllocators expose the results as [HTTP_SD endpoints](https://prometheus.io/docs/prometheus/latest/http_sd/) | ||
split by collector. | ||
|
||
#### Endpoints | ||
`/jobs`: | ||
|
||
```json | ||
{ | ||
"job1": { | ||
"_link": "/jobs/job1/targets" | ||
}, | ||
"job2": { | ||
"_link": "/jobs/job1/targets" | ||
} | ||
} | ||
|
||
``` | ||
|
||
`/jobs/{jobID}/targets`: | ||
|
||
```json | ||
{ | ||
"collector-1": { | ||
"_link": "/jobs/job1/targets?collector_id=collector-1", | ||
"targets": [ | ||
{ | ||
"Targets": [ | ||
"10.100.100.100", | ||
"10.100.100.101", | ||
"10.100.100.102" | ||
], | ||
"Labels": { | ||
"namespace": "a_namespace", | ||
"pod": "a_pod" | ||
} | ||
} | ||
] | ||
} | ||
} | ||
``` | ||
|
||
`/jobs/{jobID}/targets?collector_id={collectorID}`: | ||
|
||
```json | ||
[ | ||
{ | ||
"targets": [ | ||
"10.100.100.100", | ||
"10.100.100.101", | ||
"10.100.100.102" | ||
], | ||
"labels": { | ||
"namespace": "a_namespace", | ||
"pod": "a_pod" | ||
} | ||
} | ||
] | ||
``` | ||
|
||
|
||
## Packages | ||
### Watchers | ||
Watchers are responsible for the translation of external sources into Prometheus readable scrape configurations and | ||
triggers updates to the DiscoveryManager | ||
|
||
### DiscoveryManager | ||
Watches the Prometheus service discovery for new targets and sets targets to the Allocator | ||
|
||
### Allocator | ||
Shards the received targets based on the discovered Collector instances | ||
|
||
### Collector | ||
Client to watch for deployed Collector instances which will then provided to the Allocator. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
question as before, from which namespaces are these objects queried?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have added a line clearing this up.