Add `elasticsearch.podDisruptionBudget` to `values.yaml`
General MR
Summary
Allows us to control the behavior of the PodDisruptionBudget
created by the Elasticsearch
manifest.
Elasticsearch
default behavior is to create a PodDisruptionBudget
that "allows one Elasticsearch Pod to be taken down". However, when upgrading Kubernetes clusters, we have found this to be too aggressive and it has resulted in failed upgrades as Kubernetes is unable to evict the pods from the nodes.
Adding this value allows us to control the behavior of the PodDisruptionBudget
in the following ways:
- Default:
elasticsearch.podDisruptionBudget.create
istrue
:- Default:
elasticsearch.podDisruptionBudget.values
is{}
andspec.podDisruptionBudget
is not defined in theElasticsearch
manifest (Elasticsearch
defaultPodDisruptionBudget
behavior is used as before) - Custom:
elasticsearch.podDisruptionBudget.values
is any value and that value is passed tospec.podDisruptionBudget
in theElasticsearch
manifest (PodDisruptionBudget
behavior is fully customizable)
- Default:
- Custom:
elasticsearch.podDisruptionBudget.create
isfalse
andspec.podDisruptionBudget
is set to{}
in theElasticsearch
manifest (PodDisruptionBudget
is not created)
Because setting spec.podDisruptionBudget: {}
in the Elasticsearch
manifest is how you disable the PodDisruptionBudget
, we had to use a separate boolean create
and conditional logic to control whether or not the values
would be passed to the Elasticsearch
manifest, as {}
evaluates to false and would result in this value not making it into the manifest. This is a common way to work around such limitations in Helm charts.
Relevant logs/screenshots
Documentation: https://www.elastic.co/guide/en/cloud-on-k8s/current/k8s-pod-disruption-budget.html
Linked Issue
Closes #202 (closed)
Upgrade Notices
N/A