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

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

Open
chunter0 opened this issue May 4, 2024 · 5 comments
Open

Comments

@chunter0
Copy link
Contributor

chunter0 commented May 4, 2024

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
Copy link
Contributor Author

Any thoughts on this? @povilasv @JaredTan95 @TylerHelmuth

@TylerHelmuth
Copy link
Member

This feels like a consequence of helm and lists. The collector chart doesn't provide any default values for extraVolumes so am I right in saying this is happening because you are using the collector as a subchart in a chart (let's call it chart A), and then using chart A as a subchart in another chart?

I don't like the idea of adding multiple fields to do the same thing. In some of our other charts we have a concept of default, that lets you share config across multiple things in the chart and then an "extra" section where you can add on to the defaults, but it is all contained in 1 chart. For the collector, we have no defaults, so extraVolumes is the only thing needed.

@chunter0
Copy link
Contributor Author

Sorry just now getting back to this. Are you saying the parent chart should add defaults for these fields?

@TylerHelmuth

@chunter0
Copy link
Contributor Author

chunter0 commented Jun 7, 2024

Would it be possible to pick this convo back up? @povilasv @TylerHelmuth

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants