opentelemetry-helm-charts icon indicating copy to clipboard operation
opentelemetry-helm-charts copied to clipboard

[opentelemetry-collector] Allow more flexibility around volumes/envs

Open chunter0 opened this issue 9 months ago • 5 comments

Hi all,

When using opentelemetry-collector chart as a subchart, the only options the parent chart has to configure volumes is through extraVolumes/extraVolumeMounts fields. Which makes it hard for the parent chart to expose those fields as configurable to its users.

For example given the following scenario

# Chart.yaml

apiVersion: v2
dependencies:
- alias: telemetryCollector
  condition: telemetryCollector.enabled
  name: opentelemetry-collector
  repository: https://open-telemetry.github.io/opentelemetry-helm-charts
name: parent
# values.yaml

telemetryCollector:
  extraVolumes:
  - name: parent-volume
    secret:
      secretName: some-secret

For users of the parent chart to add more volumes to telemetryCollector subchart they would need to redefine the entire block of extraVolumes since its an array type. This UX isn't very friendly to changes

# user-values.yaml

telemetryCollector:
  extraVolumes:
  - name: parent-volume
    secret:
      secretName: some-parent-secret
  - name: user-volume
    secret:
      secretName: some-user-secret

The scenario above also applies to configuring environment variables.

Solution Options:

  1. We can add an additional volumes/envs values field

chunter0 avatar May 04 '24 19:05 chunter0