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

Add Secret resource into Helm chart to allow passing sensitive values to config via environment variables #1502

Open
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

TheoBrigitte
Copy link
Contributor

PR Description

This PR introduces a new Secret resources into the Helm chart which is used to store sensitive values as environment variables and populate them into the Alloy container to be read within the Alloy config using the env directive.

This allow for sensitive values to be stored in a Secret rather than in the ConfigMap or the Pod definition.

Notes to the Reviewer

I did my best to add some meaningful examples on how those secret values are defined and used from the config, but I am open to suggestions.

I would also appreciate some guidance on how to update the Helm chart tests.

PR Checklist

  • CHANGELOG.md updated
  • Documentation added
  • Tests updated

@CLAassistant
Copy link

CLAassistant commented Aug 19, 2024

CLA assistant check
All committers have signed the CLA.

TheoBrigitte added a commit to giantswarm/alloy-app that referenced this pull request Aug 19, 2024
TheoBrigitte added a commit to giantswarm/alloy-app that referenced this pull request Aug 20, 2024
* add secret template

* align logic with upstream PR: grafana/alloy#1502
@TheoBrigitte TheoBrigitte requested a review from a team as a code owner September 26, 2024 11:37
@clayton-cornell
Copy link
Contributor

ping @grafana/grafana-agent-maintainers for a review. No input for doc in the PR in it's current state.

@wildum
Copy link
Contributor

wildum commented Oct 2, 2024

@petewall pinging you on this PR because it's about the helm chart

Copy link
Contributor

@petewall petewall left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Personally, I don't know if I see the value for this, since this chart already has a envFrom, which lets you already do this:

envFrom:
- secretRef:
  name: mySecret

The only difference is that this chart would create a secret for you, which, I guess is helpful. It feels like this chart doing too much, IMO.

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

Successfully merging this pull request may close these issues.

5 participants