spec
spec copied to clipboard
Add ability to describe placement constraints
A few project requires describing placement constraints, such as affinity and exclusiveness. I assume these will be described by a trait? Should this be a standard or core trait as I think it's common enough?
It depends on the type of placement constraint or affinity. The spec makes no assumptions about underlying infrastructure. Something like node affinity would violate that. An implementation that assumes nodes are visible to app operators could choose to have a node affinity trait, but it shouldn't be a core trait. On the other hand, placement constraint based on something more abstract, like performance metrics or SLAs, might make more sense.
Something like node affinity would violate that
we should translate to higher level abstraction, for example:
- failure domain spreading (anti affinity) or SLA level (99% = one AZ; 99.99% = two AZs, etc..)
- deployment group (best effort to put some services together to improve network latency)
i could image to use both traits and scope.
maybe we can just do generic property matches like label selectors. Users can define whatever label they want to match (or avoid) during placement
@Haishi2016 user cannot label node, which is the placement target. they can only express affinity between deployment units. that is why the SLA and deployment group can be useful.