redpanda-operator icon indicating copy to clipboard operation
redpanda-operator copied to clipboard

Allow configuring node affinity from operator

Open vuldin opened this issue 2 years ago • 2 comments

Who is this for and what problem do they have today?

A user would like to set node affinity through the operator.

What are the success criteria?

Allowing node selector configuration via the operator. Possible relevant code is here: https://github.com/redpanda-data/redpanda/blob/2959f38e37aad6dc968159273b4b25c4e84ad22c/src/go/k8s/pkg/resources/statefulset.go#L531

Why is solving this problem impactful?

Description of the issue from the user:

the nodeSelector works but it'll cause a lot of pain to currently implement because only certain types of clusters have the specific label. vs the node affinity which would just prefers the node and is ignored for the label doesn't exist

Additional notes

JIRA Link: CORE-1160

vuldin avatar Feb 06 '23 17:02 vuldin

Will go ahead and close as this is implemented here: https://docs.redpanda.com/current/reference/k-crd/#k8s-api-github-com-redpanda-data-redpanda-operator-operator-api-redpanda-v1alpha2-redpanda

david-yu avatar Nov 13 '24 20:11 david-yu

Re-opening since base on further discussion it looks like this is not implemented in the statefulset for the Operator as you have suggested: https://docs.redpanda.com/current/reference/k-crd/#k8s-api-github-com-redpanda-data-redpanda-operator-operator-api-redpanda-v1alpha2-statefulset

david-yu avatar Nov 13 '24 21:11 david-yu

This can be achieved with statefulset.podTemplate in recent versions (5.9.x and 2.3.x) of the helm chart and operator.

chrisseto avatar May 20 '25 18:05 chrisseto