Skip to content

Commit

Permalink
Adding K8S_NODE_IP to container env vars
Browse files Browse the repository at this point in the history
  • Loading branch information
legoGoat committed Dec 16, 2024
1 parent ffcb619 commit d963aff
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion charts/opentelemetry-collector/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: v2
name: opentelemetry-collector
version: 0.111.0
version: 0.111.1
description: OpenTelemetry Collector Helm chart for Kubernetes
type: application
home: https://opentelemetry.io/
Expand Down
2 changes: 1 addition & 1 deletion charts/opentelemetry-collector/templates/_config.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ receivers:
kubeletstats:
collection_interval: 20s
auth_type: "serviceAccount"
endpoint: "${env:K8S_NODE_NAME}:10250"
endpoint: "${env:K8S_NODE_IP}:10250"
{{- end }}

{{- define "opentelemetry-collector.applyLogsCollectionConfig" -}}
Expand Down
4 changes: 4 additions & 0 deletions charts/opentelemetry-collector/templates/_pod.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,10 @@ containers:
valueFrom:
fieldRef:
fieldPath: spec.nodeName
- name: K8S_NODE_IP
valueFrom:
fieldRef:
fieldPath: status.hostIP
{{- end }}
{{- if and (.Values.useGOMEMLIMIT) ((((.Values.resources).limits).memory)) }}
- name: GOMEMLIMIT
Expand Down

0 comments on commit d963aff

Please sign in to comment.