-
Notifications
You must be signed in to change notification settings - Fork 1.1k
store constraints and affinities as labels #673
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 <victorvieux@gmail.com>
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 <victorvieux@gmail.com>
store constraints and affinities as labels
Is there any docs on this? |
With this PR, you still use
-e
to pass constraints or affinities, but swarm store those inside a labelscom.docker.swarm.affinities
andcom.docker.swarm.constraints
on the container.The code is much simpler and we don't leak those constraints/affinities inside the container's env anymore.