Istio pilot and policy anti affinity


#1

Is it possible to define antiaffinity for this two pods from control plane. If they both are on the same host and fail the mesh interconnectivity is lost (atleast that what i have established by deleting the pods at the same time). Is this something that can be done with helm or does require edits to the chart. Also does anyone know why this happens?


#2

Node affinity is already supported in Istio helm chart.

Please take a look at:

Pilot:

Mixer:


#3

Yes I am aware of node affinity but what we need is podaffinity (and antiaffinity), to set it up on different nodes when it scales, to prevent stacking everyting on a same node


#4

You have right, only node affinity is supported. Pod affinity is planned for 1.2 according to this github issue: https://github.com/istio/istio/issues/7330. As a tactical solution, you could hack _affinity.tpl to add pod affinity when waiting for the official support.