`deploy.placement` `constraints` and `placement` documentation does not match `compose-spec.json`
PaarthShah opened this issue · comments
What is the problem you're trying to solve
As an example, I want to declare a swarm service that, as a preference
, prefers to be on a worker
node.
The compose docs (github, webdocs) clearly state that each of:
deploy.placement.constraints
deploy.placement.preferences
It can be set either by a list or a map with string values.
However, in implementation, this is untrue, and the actual schema supported more closely matches what's described in the swarm services documentation.
Describe the solution you'd like
The spec should be changed to support the documentation, or the documentation should be changed to accurately reflect what's supported in the spec.
In the likely scenario that there are practical implementation differences between the processing of constraints
vs preferences
, changing the documentation seems easier and more important.
Additional context
I'm able to practically demonstrate that the documentation is incorrect, as far as the reference implementation is concerned.
Relevant/matching issue on docker/compose
: docker/compose#11853
closing as this duplicates docker/compose#11853