<@U04S8PLJWMT> hi, Is any way in the worker and wo...
# ask-ai
j
@kapa.ai hi, Is any way in the worker and workload-api-server deployed by the Airbyte chart to set a node anti afinnity?
k
Yes, you can set node anti-affinity for both the worker and workload-api-server pods deployed by the Airbyte Helm chart. The Airbyte Helm chart exposes an
affinity
field for both the worker and workload-api-server components. This field allows you to specify Kubernetes affinity and anti-affinity rules, including node anti-affinity. By default, the
affinity
field is empty, but you can override it in your
values.yaml
file to include your desired anti-affinity configuration. For example, in your `values.yaml`:
Copy code
yaml worker:   affinity:     podAntiAffinity:       requiredDuringSchedulingIgnoredDuringExecution:         - labelSelector:             matchExpressions:               - key: some-label                 operator: In                 values:                   - some-value           topologyKey: kubernetes.io/hostname  workload-api-server:   affinity:     nodeAffinity:       requiredDuringSchedulingIgnoredDuringExecution:         nodeSelectorTerms:           - matchExpressions:               - key: disallowed-node-label                 operator: In                 values:                   - disallowed-value
This configuration will apply the specified anti-affinity rules to the respective pods. The documentation and Helm chart comments confirm that the
affinity
field is available for these components and can be customized as needed for your scheduling requirements [compose/api Helm chart upgrade discussion](https://github.com/airbytehq/airbyte/issues/49843). If you need more details on the syntax, refer to the Kubernetes documentation on [affinity and anti-affinity](https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#affinity-and-anti-affinity).