It's fairly normal for k8s deployments that live in a multi-zone cluster to have topology constraints or affinity rules, however it's fairly normal to have an affinity rule per deployment, as the label selectors for pods are typically different per-deployment.
Expected Behaviour
Be able to set anti-affinity and topology spread constraints per deployment.
Current Behaviour
Cannot set affinity per deployment, and topology spread constraints are not in the chart.
Are you a GitHub Sponsor (Yes/No?)
Check at: https://github.com/sponsors/openfaas
List All Possible Solutions and Workarounds
Affinity is currently a global option for what appears to be all deployments. Per-deployment overrides is a reasonable option.
Topology Spread Constraints are not currently in the chart, and I don't think a global configuration option would really even work, as the labelSelector would need to be different per-deployment.
Which Solution Do You Recommend?
Make overrides for affinity and make topology spread configurable, not implementing a global variant.
Steps to Reproduce (for bugs)
Context
Trying to have HA for faas-netes/openfaas.
Your Environment
-
FaaS-CLI version ( Full output from: faas-cli version ):
0.13.13
-
Docker version docker version (e.g. Docker 17.0.05 ):
20.10.8
-
What version and distriubtion of Kubernetes are you using? kubectl version
server v1.21.3
client v1.22.2
-
Operating System and version (e.g. Linux, Windows, MacOS):
MacOS
-
Link to your project or a code example to reproduce issue:
-
What network driver are you using and what CIDR? i.e. Weave net / Flannel
It's fairly normal for k8s deployments that live in a multi-zone cluster to have topology constraints or affinity rules, however it's fairly normal to have an affinity rule per deployment, as the label selectors for pods are typically different per-deployment.
Expected Behaviour
Be able to set anti-affinity and topology spread constraints per deployment.
Current Behaviour
Cannot set affinity per deployment, and topology spread constraints are not in the chart.
Are you a GitHub Sponsor (Yes/No?)
Check at: https://github.com/sponsors/openfaas
List All Possible Solutions and Workarounds
Affinity is currently a global option for what appears to be all deployments. Per-deployment overrides is a reasonable option.
Topology Spread Constraints are not currently in the chart, and I don't think a global configuration option would really even work, as the
labelSelectorwould need to be different per-deployment.Which Solution Do You Recommend?
Make overrides for affinity and make topology spread configurable, not implementing a global variant.
Steps to Reproduce (for bugs)
Context
Trying to have HA for
faas-netes/openfaas.Your Environment
FaaS-CLI version ( Full output from:
faas-cli version):0.13.13
Docker version
docker version(e.g. Docker 17.0.05 ):20.10.8
What version and distriubtion of Kubernetes are you using?
kubectl versionserver v1.21.3
client v1.22.2
Operating System and version (e.g. Linux, Windows, MacOS):
MacOS
Link to your project or a code example to reproduce issue:
What network driver are you using and what CIDR? i.e. Weave net / Flannel