vectordotdev / helm-charts

Helm charts for Vector.
https://vector.dev
Mozilla Public License 2.0
103 stars 89 forks source link

Support for topologySpreadConstraints #301

Closed seanocca closed 1 year ago

seanocca commented 1 year ago

A note for the community

Use Cases

Instead of using pod affinity and anti-aaffinity we can use the new topologySpreadConstraints to spread pods throughout nodes based on label selectors. The main issue is with the Karpenter deployment as they have decided to not support anti-affinity in favour of topologySpreadConstraints. I would like to spread the pods based on zone and hostname

Attempted Solutions

Attempted anti-affinity but it is failing on Karpenter because it fails deprovisioning operations

Proposal

This would just be another values file element in the top layer spec, similar to the current setup of antiAffinity. It would be an array of values with the main required values listed here TopologySpread

  topologySpread:
  - maxSkew: <integer>
    topologyKey: <string>
    whenUnsatisfiable: <string>
    labelSelector: <object>

References

No response

Version

v0.29.1

sbalmos commented 1 year ago

This already is supported in the Helm values file. See https://github.com/vectordotdev/helm-charts/tree/develop/charts/vector, 3rd line from the bottom in the Vector values table.

spencergilbert commented 1 year ago

Oh, right you are: https://github.com/vectordotdev/helm-charts/blob/develop/charts/vector/values.yaml#L217-L219

Thanks @sbalmos!