Use `shareProcessNamespace` to shut down the proxy when the main container shuts down
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 11.5k
- Forks
- 1.4k
- Avg merge
- 3d 22h
- Merged PRs (30d)
- 53
Description
## Feature Request
### What problem are you trying to solve?
Our main app containers have various durations for their graceful shut downs, sometimes even within the same application (e.g. in prod n seconds, in dev m << n seconds). We want the proxy process to stay alive until the main app container shuts down (graceful shutdown might still need network). We also want the proxy container to shut down as quickly as possible after the app has shut down.
### How should the problem be solved?
We can achieve this by applying the solution proposed here: https://github.com/linkerd/linkerd2/issues/1869#issuecomment-595456178
It would be fantastic if this solution would be implemented by the proxy injection and instead allow users to set something along the lines of
```
config.linkerd.io/shutdown-proxy-after-application: "true"
```
Fwiw this along with [linkerd-await](https://github.com/olix0r/linkerd-await) is essentially side-car "support" by ensuring the proxy starts before the app, and stops after the app.
### Any alternatives you've considered?
The link above, by doing this manually, but we'd like to avoid all the boilerplate involved with adding this to all our applications.
### How would users interact with this feature?
a configuration annotation mentioned above.
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 with the proxy injection entry point and the Kubernetes shareProcessNamespace behavior described in the issue. Determine how the proposed shutdown-proxy-after-application annotation should be exposed and applied. Done means the configured proxy remains available during graceful application shutdown and exits promptly afterward.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- kubernetes
- Domain
- infrastructure
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100