Skip to content

Commit 170bb03

Browse files
kayahkHakan Kayahengfeiyang
authored
fix/gateway-targetallocator-resources (#157)
* refactor: update values.yaml and gateway.yaml for resource configuration The current template for the `gateway` does not properly assign resource definitions for the `targetAllocator` pod. - Adjusted the formatting of tolerations and log exclusions in values.yaml for consistency. - Added resource configuration support for the target allocator in gateway.yaml. * Removed commented-out resource limits and requests for the targetAllocator in values.yaml --------- Co-authored-by: Hakan Kaya <[email protected]> Co-authored-by: Hengfei Yang <[email protected]>
1 parent c45cae8 commit 170bb03

File tree

2 files changed

+38
-10
lines changed

2 files changed

+38
-10
lines changed

charts/openobserve-collector/templates/gateway.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ spec:
1111
targetAllocator:
1212
enabled: {{ .Values.gateway.targetAllocator.enabled }}
1313
serviceAccount: {{ include "openobserve-collector.serviceAccountName" . }}
14+
{{- with .Values.gateway.targetAllocator.resources }}
15+
resources:
16+
{{- toYaml . | nindent 6 }}
17+
{{- end }}
1418
prometheusCR:
1519
enabled: true
1620
serviceMonitorSelector: {}
@@ -64,4 +68,4 @@ spec:
6468
exporters:
6569
{{ toYaml .Values.exporters | indent 6 }}
6670
service:
67-
{{ toYaml .Values.gateway.service | indent 6 }}
71+
{{ toYaml .Values.gateway.service | indent 6 }}

charts/openobserve-collector/values.yaml

Lines changed: 33 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -78,14 +78,26 @@ agent:
7878
# cpu: 100m
7979
# memory: 128Mi
8080
receivers:
81+
otlp:
82+
protocols:
83+
grpc: {}
84+
http: {}
85+
prometheus:
86+
config:
87+
scrape_configs:
88+
- job_name: "otel-collector"
89+
scrape_interval: 5s
90+
static_configs:
91+
- targets: ["0.0.0.0:8888"]
92+
8193
filelog/std:
8294
include: [/var/log/pods/*/*/*.log]
8395
exclude:
8496
# Exclude logs from all containers named otel-collector or otc-container (otel-contrib)
85-
- /var/log/pods/*/otel-collector/*.log # named otel-collector
86-
- /var/log/pods/*/otc-container/*.log # named otc-container (for otel-contrib containers)
87-
- /var/log/pods/*/openobserve-ingester/*.log # avoid cyclical logs as ingester logs can be massive
88-
start_at: beginning
97+
- /var/log/pods/*/otel-collector/*.log # named otel-collector
98+
- /var/log/pods/*/otc-container/*.log # named otc-container (for otel-contrib containers)
99+
- /var/log/pods/*/openobserve-ingester/*.log # avoid cyclical logs as ingester logs can be massive
100+
start_at: end
89101
include_file_path: true
90102
include_file_name: false
91103
operators:
@@ -186,11 +198,11 @@ agent:
186198
- sysfs
187199
- tracefs
188200
load: {}
189-
# memory: {}
201+
# memory: {}
190202
network: {}
191-
# paging: {}
192-
# processes: {}
193-
# process: {} # a bug in the process scraper causes the collector to throw errors so disabling it for now
203+
# paging: {}
204+
# processes: {}
205+
process: {} # a bug in the process scraper causes the collector to throw errors so disabling it for now
194206
kubeletstats:
195207
collection_interval: 30s
196208
auth_type: "serviceAccount"
@@ -310,6 +322,18 @@ gateway:
310322
enabled: true
311323
targetAllocator:
312324
enabled: false
325+
resources:
326+
{}
327+
# We usually recommend not to specify default resources and to leave this as a conscious
328+
# choice for the user. This also increases chances charts run on environments with little
329+
# resources, such as Minikube. If you do want to specify resources, uncomment the following
330+
# lines, adjust them as necessary, and remove the curly braces after 'resources:'.
331+
# limits:
332+
# cpu: 100m
333+
# memory: 128Mi
334+
# requests:
335+
# cpu: 50m
336+
# memory: 64Mi
313337
affinity: {}
314338
nodeSelector: {}
315339
tolerations: []
@@ -344,7 +368,7 @@ gateway:
344368
metrics:
345369
k8s.container.cpu_limit: # redundant
346370
enabled: false
347-
k8s.container.cpu_request: # redundant
371+
k8s.container.cpu_request: # redundant
348372
enabled: false
349373
k8s.container.memory_limit: # redundant
350374
enabled: false

0 commit comments

Comments
 (0)