Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Peer addresses #3419
Many apps need to know where their peers are, to do some sort of replication or sharding. (hopefully this isn't a duplicate; I did search...)
We have the "endpoints" concept. If we provided easy-to-use plumbing, that could make it easier to use the above sort of app.
Having kubelet stuff them in env variables is not quite right, because the list could change.
So I propose making a little container that watches endpoints, and writes out a config file whenever they change.
It could take the service to watch as an env var. It should optionally write out a file (using the go template language), optionally run a command, optionally send HUP or whatever else seems useful.
People could use this as a sidecar container in their pod, to get their app joining the rest of their cluster.