Until now the only solution that I found is use --config-yaml
, something like that
envoy -c /etc/service-envoy.yaml \
--config-yaml "'static_resources': {
'clusters': [
{
'name': 'jaeger',
'connect_timeout': '1s',
'type': 'strict_dns',
'lb_policy': 'round_robin',
'hosts': [
{
'socket_address': {
'address': '$JAEGER_HOST',
'port_value': 9411
}
}
]
}
]
}"
If you want environmental variables to be expanded your application will need to do that itself. A common way of doing this is to use the cmd syntax %variable% and then using Environment. ExpandEnvironmentVariables to expand them.
On the Advanced tab, click Environment Variables. Click New to create a new environment variable. Click Edit to modify an existing environment variable. After creating or modifying the environment variable, click Apply and then OK to have the change take effect.
On the Projects page, select the project that you want to import environment variables to, and click Properties to open the Project Properties window. On the General page, click Environment. In the Environment Variables dialog, click Import from File.
I found the solution in this article, using envsubst
https://blog.markvincze.com/how-to-use-envoy-as-a-load-balancer-in-kubernetes/
cat /tmpl/envoy.yaml.tmpl | envsubst \$ENVOY_LB_ALG,\$SERVICE_NAME > /etc/envoy.yaml
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With