From d2b2d495875f5c9250d73bdd387fb7199edec1ac Mon Sep 17 00:00:00 2001 From: Dmitry Date: Tue, 25 May 2021 12:11:38 -0700 Subject: [PATCH] Add an option to mount extra volumes to the daemonset --- CHANGELOG.md | 6 ++++++ helm-charts/splunk-otel-collector/Chart.yaml | 2 +- helm-charts/splunk-otel-collector/templates/daemonset.yaml | 6 ++++++ helm-charts/splunk-otel-collector/values.yaml | 5 +++++ 4 files changed, 18 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1f36deb2bb..6a8147065a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,12 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). +## [0.26.1] - 2021-05-25 + +### Added + +- Add an option to mount extra volumes using `otelAgent.extraVolumes` and `otelAgent.extraVolumeMounts` (#151) + ## [0.26.0] - 2021-05-21 ### Added diff --git a/helm-charts/splunk-otel-collector/Chart.yaml b/helm-charts/splunk-otel-collector/Chart.yaml index bffbd9942a..328f52b75a 100644 --- a/helm-charts/splunk-otel-collector/Chart.yaml +++ b/helm-charts/splunk-otel-collector/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v2 name: splunk-otel-collector -version: 0.26.0 +version: 0.26.1 description: Splunk OpenTelemetry Connector for Kubernetes icon: https://github.com/signalfx/splunk-otel-collector-chart/tree/main/splunk.png type: application diff --git a/helm-charts/splunk-otel-collector/templates/daemonset.yaml b/helm-charts/splunk-otel-collector/templates/daemonset.yaml index 1d588f7dd9..ccdfa5eed1 100644 --- a/helm-charts/splunk-otel-collector/templates/daemonset.yaml +++ b/helm-charts/splunk-otel-collector/templates/daemonset.yaml @@ -176,6 +176,9 @@ spec: readOnly: true mountPropagation: HostToContainer {{- end }} + {{- if .Values.otelAgent.extraVolumeMounts }} + {{- toYaml .Values.otelAgent.extraVolumeMounts | nindent 8 }} + {{- end }} terminationGracePeriodSeconds: {{ .Values.terminationGracePeriodSeconds }} volumes: {{- if .Values.logsEnabled }} @@ -206,6 +209,9 @@ spec: items: - key: relay path: relay.yaml + {{- if .Values.otelAgent.extraVolumes }} + {{- toYaml .Values.otelAgent.extraVolumes | nindent 6 }} + {{- end }} {{- if .Values.priorityClassName }} priorityClassName: {{ .Values.priorityClassName }} {{- end }} diff --git a/helm-charts/splunk-otel-collector/values.yaml b/helm-charts/splunk-otel-collector/values.yaml index 239872df6f..0080b91cd0 100644 --- a/helm-charts/splunk-otel-collector/values.yaml +++ b/helm-charts/splunk-otel-collector/values.yaml @@ -147,6 +147,11 @@ otelAgent: # Extra enviroment variables to be set in the OTel agent container extraEnvs: [] + # Extra volumes to be mounted to the agent daemonset. + # The volumes will be available for both OTel agent and fluentd containers. + extraVolumes: [] + extraVolumeMounts: [] + # OpenTelemetry Collector configuration for otel-agent daemonset can be overriden in this field. # Default configuration defined in config/otel-agent-config.yaml # Any additional fields will be merged into the defaults,