-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
[cmd/opampsupervisor] Support environment variable expansion in supervisor config #36269
Comments
Pinging code owners:
See Adding Labels via Comments if you do not have permissions to add labels yourself. |
Hi! Just so you know, server:
endpoint: ${env:OPAMP_SERVER_ENDPOINT}
agent:
executable: /bin/otelcontribcol notice the env prefix. |
Appreciate the call out! I plan to specify resolverSettings := confmap.ResolverSettings{
URIs: []string{configFile},
ProviderFactories: []confmap.ProviderFactory{
fileprovider.NewFactory(),
envprovider.NewFactory(),
},
ConverterFactories: []confmap.ConverterFactory{},
DefaultScheme: "env",
} |
Component(s)
cmd/opampsupervisor
Is your feature request related to a problem? Please describe.
Currently, environment variable expansion is not supported in the supervisor configuration. For example, given the following configuration:
and the following environment variable set:
the final configuration does not expand the referenced environment variable to result in a final configuration of:
Describe the solution you'd like
I'd like to utilize the
go.opentelemetry.io/collector/confmap
Resolver along with thego.opentelemetry.io/collector/confmap/provider/envprovider
andgo.opentelemetry.io/collector/confmap/provider/fileprovider
Providers to allow for the expansion of environment variables when the supervisor config is read in from file.Describe alternatives you've considered
No response
Additional context
I'm happy to implement this enhancement if accepted.
The text was updated successfully, but these errors were encountered: