elastic / cloud-on-k8s

Elastic Cloud on Kubernetes
Other
2.58k stars 702 forks source link

Allow different/multiple PodDisruptionBudgets for Elasticsearch clusters #7673

Open nullren opened 6 months ago

nullren commented 6 months ago

Proposal

Allow multiple PodDisruptionBudgets for an Elasticsearch cluster to be created and set for different types of NodeSets or node roles.

Right now, only 1 PDB is created per cluster which be default only allows for 1 disruption per cluster. It would be nice to, for example, define a PDB for just manager nodes that allows for 1 disruption, a separate PDB for data nodes that allows a different number of disruptions, and a separate PDB for coordinating-only nodes that allow unlimited disruptions.

Ideally, I could define many PDBs with varying rules as my ES cluster can have different requirements based on the nodes and shard placement and redundancy.

Specifically, we run large clusters, and right now, we can only really have 1 disruption because if we lose two manager nodes, that would be bad news bears for us. It would be nice to have a more aggressive PDB for different node types.

nullren commented 4 months ago

even being able to just exclude some nodesets would be helpful. eg, having a selector that's like

elasticsearch.k8s.elastic.co/cluster-name=my-cluster,elasticsearch.k8s.elastic.co/statefulset-name notin (my-cluster-es-read-client,my-cluster-es-write-client)