-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Allow environment variables to have a default value #2534
Comments
I can work on this. |
@jcchavezs please wait couple of days until we publish a document about the syntax we want for this. |
Will be addressed by #2469 with general default syntax. |
Any progress made here? We've got some env vars that have (multiple) fallbacks, so these default values would be really nice. |
It is part of the configsource in Splunk distribution but I'm not sure if there's a timeline of when it will be upstreamed https://github.com/signalfx/splunk-otel-collector/tree/main/internal/configsource/envvarconfigsource @pjanotti? |
Bumps [aquasecurity/trivy-action](https://github.com/aquasecurity/trivy-action) from 0.8.0 to 0.9.0. - [Release notes](https://github.com/aquasecurity/trivy-action/releases) - [Commits](aquasecurity/trivy-action@0.8.0...0.9.0) --- updated-dependencies: - dependency-name: aquasecurity/trivy-action dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
A workaround for the lack of this capability in k8s based deployments is to use a layered configmap reference. In a
Deploy Create The same thing works with
If you use flux for your manifest deployments, you can annotate your overrides configmap with e.g.
to ensure flux won't try to delete it. (You can avoid having the defaults configmap by defining env literals in the app manifest instead but I dislike doing so. The defaults and overrides pattern makes it a bit more discoverable.) |
Is your feature request related to a problem? Please describe.
When using environmental variables you may want to have a default that is used if a user does not override it. For example:
Describe the solution you'd like
Allow bash-like variable substitution.
Describe alternatives you've considered
Not allowing it and require all defaults to be set external to the process. The downside is that the config and defaults now live in two separate places.
The text was updated successfully, but these errors were encountered: