spec icon indicating copy to clipboard operation
spec copied to clipboard

Add ability to describe placement constraints

Open Haishi2016 opened this issue 5 years ago • 4 comments

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?

Haishi2016 avatar Feb 11 '20 18:02 Haishi2016

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.

vturecek avatar Feb 12 '20 21:02 vturecek

Something like node affinity would violate that

we should translate to higher level abstraction, for example:

  1. failure domain spreading (anti affinity) or SLA level (99% = one AZ; 99.99% = two AZs, etc..)
  2. deployment group (best effort to put some services together to improve network latency)

i could image to use both traits and scope.

xiang90 avatar Feb 12 '20 22:02 xiang90

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 avatar Feb 12 '20 22:02 Haishi2016

@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.

xiang90 avatar Feb 13 '20 03:02 xiang90