Skip to content

Commit

Permalink
fix: set GO usage environment variables from resource limits (#42)
Browse files Browse the repository at this point in the history
  • Loading branch information
rogercoll authored Oct 31, 2024
1 parent b3a7bbd commit 6c7e5d8
Showing 1 changed file with 34 additions and 15 deletions.
49 changes: 34 additions & 15 deletions resources/kubernetes/operator/helm/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,19 +23,6 @@ defaultCRConfig:
targetAllocator:
enabled: false # Enable/disable the Operator's Target allocator.
# Refer to: https://github.com/open-telemetry/opentelemetry-operator/tree/main/cmd/otel-allocator
env:
- name: ELASTIC_AGENT_OTEL
value: '"true"'
- name: ELASTIC_ENDPOINT
valueFrom:
secretKeyRef:
name: elastic-secret-otel
key: elastic_endpoint
- name: ELASTIC_API_KEY
valueFrom:
secretKeyRef:
name: elastic-secret-otel
key: elastic_api_key

clusterRole:
rules:
Expand All @@ -59,6 +46,19 @@ collectors:
# requests:
# cpu: 100m
# memory: 500Mi
env:
- name: ELASTIC_AGENT_OTEL
value: '"true"'
- name: ELASTIC_ENDPOINT
valueFrom:
secretKeyRef:
name: elastic-secret-otel
key: elastic_endpoint
- name: ELASTIC_API_KEY
valueFrom:
secretKeyRef:
name: elastic-secret-otel
key: elastic_api_key
config:
exporters:
# [Debug exporter](https://github.com/open-telemetry/opentelemetry-collector/blob/main/exporter/debugexporter/README.md)
Expand Down Expand Up @@ -219,11 +219,30 @@ collectors:
# Configure the pods resources to control CPU and memory usage.
resources:
limits:
cpu: 100m
memory: 500Mi
cpu: 1500m
memory: 1500Mi
requests:
cpu: 100m
memory: 500Mi
env:
- name: ELASTIC_AGENT_OTEL
value: '"true"'
- name: ELASTIC_ENDPOINT
valueFrom:
secretKeyRef:
name: elastic-secret-otel
key: elastic_endpoint
- name: ELASTIC_API_KEY
valueFrom:
secretKeyRef:
name: elastic-secret-otel
key: elastic_api_key
- name: GOMAXPROCS
valueFrom:
resourceFieldRef:
resource: limits.cpu
- name: GOMEMLIMIT
value: "1025MiB"
presets:
logsCollection:
enabled: true # Enable/disable the collection of node's logs.
Expand Down

0 comments on commit 6c7e5d8

Please sign in to comment.