linkerd / linkerd/linkerd

Automatic env var substitution in linkerd config files

Open
#1,450 3 comments 0 reactions 0 assignees View on GitHub

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.