Automatic env var substitution in linkerd config files
Nobody has claimed this yet.
- Dominant language
- Scala
- Stars
- 5.3k
- Forks
- 494
- PR merge metrics
- No merged PRs in 30d
Description
Support automatic replacement of environment variables in the linkerd.conf file when linkerd starts up.
This is useful in a number of scenarios when parts of the config are not known until runtime especially when running in a docker container ([see my blog post for a real world scenario](https://kevinholditch.co.uk/2017/06/28/running-linkerd-in-a-docker-container-on-aws-ecs/)).
The format of the variable in the config file could be prefixed with a '$' for example:
```
interpreter:
kind: default
transformers:
– kind: io.l5d.specificHost
host: $LOCAL_IP
```
Here $LOCAL_IP would be replaced with the value found at runtime in the environment variable LOCAL_IP.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing the startup path that loads linkerd.conf and identify where configuration values are parsed before Linkerd starts. Check how the existing configuration handling can recognize values such as $LOCAL_IP, then add coverage for substitution from the runtime environment. Done means supported environment variables are replaced when Linkerd starts, including the Docker-container scenario described.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, scala
- Domain
- infrastructure
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100