store constraints and affinities as labels#673
store constraints and affinities as labels#673aluzzardi merged 2 commits intodocker-archive:masterfrom vieux:labels_storage
Conversation
|
@abronan @aluzzardi please take a look. |
|
I suggested the same in docker-compose; perhaps also add a label for the version of swarm that's used to set the labels; this allows for migrating existing labels/containers in case the format changes in future. (Reading on my phone, so it's possible its in there already, but I overlooked) |
|
LGTM @thaJeztah Yes that would be a good idea, overall I like the idea of interfering with |
|
I think the store (RequestedState) should be using a cluster.ContainerConfig so we serialize any extra data we might have |
And
👍 |
Signed-off-by: Victor Vieux <[email protected]>
|
I switched to 2 keys |
|
@aluzzardi can you please take another look and comment on the PR if I forgot something ? |
|
LGTM There's just a tiny golint error |
Signed-off-by: Victor Vieux <[email protected]>
store constraints and affinities as labels
|
Is there any docs on this? |
With this PR, you still use
-eto pass constraints or affinities, but swarm store those inside a labelscom.docker.swarm.affinitiesandcom.docker.swarm.constraintson the container.The code is much simpler and we don't leak those constraints/affinities inside the container's env anymore.