Expose service ID as environment variable
- Dominant language
- Go
- Stars
- 17k
- Forks
- 2.1k
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 105
Description
At the moment, there's no way for a service to know it's own identity. This presents a problem if you want your services to register for pushed messages. As a workaround you'd have to come up with a tagging scheme for the pushing service to seek out services which wish to receive pushed updates.
This also means that if a service wants to remove itself from that sort of list, there's no way to do so without modifying its job entry and redeploying (since tags on services are not mutable).
I think there's only one service ID per allocation, so maybe this wouldn't be too hard?
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by tracing how Nomad constructs the environment for services running in an allocation and how service identity is represented. Define the intended allocation-level service ID and its environment-variable behavior, then add coverage for exposure to the service and the registration and removal use cases described in the issue.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- backend, infrastructure
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 28/100