Skip to content
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

chore(collector): upgrade to app version 0.37.1 #89

Merged
merged 8 commits into from
Oct 25, 2021
4 changes: 2 additions & 2 deletions 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.6.0
version: 0.7.0
description: OpenTelemetry Collector Helm chart for Kubernetes
type: application
home: https://opentelemetry.io/
Expand All @@ -13,4 +13,4 @@ maintainers:
- name: pjanotti
- name: tigrannajaryan
icon: https://opentelemetry.io/img/logos/opentelemetry-logo-nav.png
appVersion: 0.22.0
appVersion: 0.36.0
22 changes: 18 additions & 4 deletions charts/opentelemetry-collector/templates/_config.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,26 @@ Merge user supplied top-level (not particular to standalone or agent) config int
{{- .Values.config | toYaml }}
{{- end }}

{{/*
Merge user supplied top-level (not particular to standalone or agent) config into memory ballast config.
*/}}
{{- define "opentelemetry-collector.ballastConfig" -}}
{{- $memoryBallastConfig := get .Values.config.extensions "memory_ballast" }}
{{- if or (not $memoryBallastConfig) (not $memoryBallastConfig.size_mib) }}
{{- $_ := set $memoryBallastConfig "size_mib" (include "opentelemetry-collector.getMemBallastSizeMib" .Values.resources.limits.memory) }}
{{- end }}
{{- .Values.config | toYaml }}
{{- end }}


{{/*
Build config file for agent OpenTelemetry Collector
*/}}
{{- define "opentelemetry-collector.agentCollectorConfig" -}}
{{- $values := deepCopy .Values.agentCollector | mustMergeOverwrite (deepCopy .Values) }}
{{- $data := dict "Values" $values | mustMergeOverwrite (deepCopy .) }}
{{- $config := include "opentelemetry-collector.baseConfig" $data | fromYaml }}
{{- $config := include "opentelemetry-collector.ballastConfig" $data | fromYaml | mustMergeOverwrite $config }}
{{- $config := include "opentelemetry-collector.agent.containerLogsConfig" $data | fromYaml | mustMergeOverwrite $config }}
{{- $config := include "opentelemetry-collector.agentConfigOverride" $data | fromYaml | mustMergeOverwrite $config }}
{{- .Values.agentCollector.configOverride | mustMergeOverwrite $config | toYaml }}
Expand Down Expand Up @@ -111,7 +124,8 @@ Default config override for agent collector deamonset
exporters:
otlp:
endpoint: {{ include "opentelemetry-collector.fullname" . }}:4317
insecure: true
tls:
insecure: true
{{- end }}

{{- if .Values.standaloneCollector.enabled }}
Expand Down Expand Up @@ -174,11 +188,11 @@ receivers:
# Extract metadata from file path
- type: regex_parser
id: extract_metadata_from_filepath
regex: '^.*\/(?P<namespace>[^_]+)_(?P<pod_name>[^_]+)_(?P<uid>[a-f0-9\-]{36})\/(?P<container_name>[^\._]+)\/(?P<run_id>\d+)\.log$'
parse_from: $$attributes.file_path
regex: '^.*\/(?P<namespace>[^_]+)_(?P<pod_name>[^_]+)_(?P<uid>[a-f0-9\-]+)\/(?P<container_name>[^\._]+)\/(?P<run_id>\d+)\.log$'
parse_from: $$attributes["file.path"]
# Move out attributes to Attributes
- type: metadata
labels:
attributes:
stream: 'EXPR($.stream)'
k8s.container.name: 'EXPR($.container_name)'
k8s.namespace.name: 'EXPR($.namespace)'
Expand Down
1 change: 0 additions & 1 deletion charts/opentelemetry-collector/templates/_pod.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ containers:
- /{{ .Values.command.name }}
- --config=/conf/relay.yaml
- --metrics-addr=0.0.0.0:8888
- --mem-ballast-size-mib={{ template "opentelemetry-collector.getMemBallastSizeMib" .Values.resources.limits.memory }}
secustor marked this conversation as resolved.
Show resolved Hide resolved
{{- range .Values.command.extraArgs }}
- {{ . }}
{{- end }}
Expand Down
7 changes: 4 additions & 3 deletions charts/opentelemetry-collector/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ config:
logging: {}
extensions:
health_check: {}
memory_ballast: {}
secustor marked this conversation as resolved.
Show resolved Hide resolved
processors:
batch: {}
# If set to null, will be overridden with values based on k8s resource limits
Expand Down Expand Up @@ -71,16 +72,16 @@ config:
# Can be overridden here or for any component independently using the same keys.

image:
# If you want to use the contrib image `otel/opentelemetry-collector-contrib`, you also need to change `command.name` value to `otelcontribcol`.
repository: otel/opentelemetry-collector
# If you want to use the core image `otel/opentelemetry-collector`, you also need to change `command.name` value to `otelcol`.
repository: otel/opentelemetry-collector-contrib
pullPolicy: IfNotPresent
# Overrides the image tag whose default is the chart appVersion.
tag: ""
imagePullSecrets: []

# OpenTelemetry Collector executable
command:
name: otelcol
name: otelcontribcol
extraArgs: []

serviceAccount:
Expand Down