Skip to content

Commit

Permalink
fix(metrics/collector): disabling kubelet and cAdvisor metrics
Browse files Browse the repository at this point in the history
  • Loading branch information
Mikołaj Świątek authored and swiatekm committed Jul 6, 2023
1 parent f4e7ce3 commit 1767f8c
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
1 change: 1 addition & 0 deletions .changelog/3133.added.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
feat(metrics/collector): allow disabling cadvisor and kubelet metrics
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ receivers:
config:
global:
scrape_interval: 30s
scrape_configs:
## As of right now, if scrape_configs is empty, it needs to be an empty list, otherwise otel-operator rejects it
scrape_configs: {{ not (or .Values.sumologic.metrics.collector.otelcol.kubelet.enabled .Values.sumologic.metrics.collector.otelcol.cAdvisor.enabled) | ternary "[]" "" }}
{{- if .Values.sumologic.metrics.collector.otelcol.kubelet.enabled }}
## These scrape configs are for kubelet metrics
## Prometheus operator does this by manually maintaining a Service with Endpoints for all Nodes
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,8 @@ spec:
config:
global:
scrape_interval: 30s
scrape_configs:
## As of right now, if scrape_configs is empty, it needs to be an empty list, otherwise otel-operator rejects it
scrape_configs:
## These scrape configs are for kubelet metrics
## Prometheus operator does this by manually maintaining a Service with Endpoints for all Nodes
## We don't have that capability, so we need to use a static configuration
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,8 @@ spec:
config:
global:
scrape_interval: 30s
scrape_configs:
## As of right now, if scrape_configs is empty, it needs to be an empty list, otherwise otel-operator rejects it
scrape_configs: []
target_allocator:
endpoint: http://RELEASE-NAME-sumologic-metrics-targetallocator
interval: 30s
Expand Down

0 comments on commit 1767f8c

Please sign in to comment.