Skip to content

Commit f8b9343

Browse files
feat(kube-stack): add command field support to collector template (open-telemetry#2096)
* feat(kube-stack): add command field support to collector template The OpenTelemetryCollector CRD supports a `command` field, but the chart's collector template does not render it. This adds support for overriding the collector's entrypoint command through values.yaml, following the same pattern as other optional fields like `args`, `lifecycle`, etc. Use case: users deploying BYO collector configs with init containers that need to source environment files or wrap the collector binary before starting. * chore(kube-stack): bump chart version to 0.14.6 --------- Co-authored-by: Tyler Helmuth <12352919+TylerHelmuth@users.noreply.github.com>
1 parent 6ef320c commit f8b9343

3 files changed

Lines changed: 13 additions & 1 deletion

File tree

charts/opentelemetry-kube-stack/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
apiVersion: v2
22
name: opentelemetry-kube-stack
3-
version: 0.14.5
3+
version: 0.14.6
44
description: |
55
OpenTelemetry Quickstart chart for Kubernetes.
66
Installs an operator and collector for an easy way to get started with Kubernetes observability.

charts/opentelemetry-kube-stack/templates/collector.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,10 @@ spec:
5858
nodeSelector:
5959
{{- toYaml . | nindent 4}}
6060
{{- end }}
61+
{{- with $collector.command }}
62+
command:
63+
{{- toYaml . | nindent 4}}
64+
{{- end }}
6165
{{- with $collector.args }}
6266
args:
6367
{{- toYaml . | nindent 4}}

charts/opentelemetry-kube-stack/values.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,14 @@ defaultCRConfig:
176176
nodeSelector: {}
177177
# nodeType: worker
178178

179+
# Command to override the collector's entrypoint
180+
command: []
181+
# - /bin/sh
182+
# - -c
183+
# - |
184+
# . /node-env/env.sh
185+
# exec /otelcol-contrib --config=/conf/collector.yaml
186+
179187
# Arguments for the collector
180188
args: {}
181189
# arg1: value1

0 commit comments

Comments
 (0)