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?
Node affinity is already supported in Istio helm chart.
Please take a look at:
Pilot:
Mixer:
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
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.
Thanks for tracking that issue for me.Yes i could hack it and i see that they plan to support it also which is great.
@volatilemolotov, A quick update here to mention that pod affinity is released with Istio 1.1.3.
mixer:
enabled: true
podAntiAffinityTermLabelSelector:
- key: istio
operator: In
values: mixer
topologyKey: kubernetes.io/hostname
pilot:
enabled: true
podAntiAffinityTermLabelSelector:
- key: istio
operator: In
values: pilot
topologyKey: kubernetes.io/hostname
@volatilemolotov these should work in the helm charts from branch release-1.1