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 support for providing env vars with envFrom #124

Merged
merged 1 commit into from
Jul 26, 2024
Merged

Add support for providing env vars with envFrom #124

merged 1 commit into from
Jul 26, 2024

Conversation

ghost
Copy link

@ghost ghost commented Jul 26, 2024

Motivation

We include the localstack helm chart as a dependency to a wrapper chart and would like to be able to set an environment variable that is derived from a value passed to the wrapper. This is currently not possible as the values for the localstack subchart can not refer to another value. Here's a brief example of how we'd like to use this:

Chart.yaml:

apiVersion: v2
name: wrapper-chart
description: A wrapper around the localstack chart
type: application
version: 1.0.0
appVersion: "1.0.0"
dependencies:
  - name: localstack
    version: 0.6.16
    repository: https://localstack.github.io/helm-charts

Wrapper chart values.yaml

subdomain: foobar
environment: example

localstack:
  extraEnvVars:
    - name: SERVICES
      value: s3
  envFrom:
    - configMapRef:
        name: localstack-env-vars

localstack-env-vars-configmap.yaml

apiVersion: v1
kind: ConfigMap
metadata:
  name: localstack-env-vars
data:
  LOCALSTACK_HOST: "{{ .Values.subdomain }}.{{ .Values.environment }}.internal"

Changes

The PR adds support for providing environment variables via ConfigMaps and/or Secrets via envFrom.

@ghost ghost requested review from alexrashed and lakkeger as code owners July 26, 2024 00:23
@alexrashed alexrashed added the type: enhancement Improvement to usability or performance label Jul 26, 2024
Copy link
Member

@alexrashed alexrashed left a comment

Choose a reason for hiding this comment

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

@breynolds-parachute, thanks a lot for your contribution!
Well described, useful enhancement, clean implementation! 💯
I also quickly sanity-checked the changes and it works perfectly fine!
:shipit:

@alexrashed alexrashed merged commit d896940 into localstack:main Jul 26, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement Improvement to usability or performance
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants