PodDisruptionBudget for fluentd
florianstoeber opened this issue · comments
Is your feature request related to a problem? Please describe.
In maintenance situations (Kubernetes update, node-image update, etc.), too many fluentds may be drained from the nodes. This can lead to an overflow situation in the fluentds, and the stability of the logging system is not guaranteed.
Describe the solution you'd like
The FluentdSpec should be enhanced to have a pdb field. This can be configured optionally in the following regard and create a corresponding PDB for the fluentd Statefulset:
fluentd:
pdb:
minAvailable: 2
fluentd:
pdb:
minUnavailable: 10%
This should then lead to following PDB (as an example):
apiVersion: policy/v1
kind: PodDisruptionBudget
metadata:
name: <loggingRef>-fluentd
spec:
minAvailable: 2
selector:
matchLabels:
<labels of the fluentd Statefulset>
apiVersion: policy/v1
kind: PodDisruptionBudget
metadata:
name: <loggingRef>-fluentd
spec:
minUnavailable: 10%
selector:
matchLabels:
<labels of the fluentd Statefulset>
Describe alternatives you've considered
An alternative for me is to create the PDB manually or with an umbrella helm-chart. There might also be other solutions, but creating a PDB for the component is the easiest and Kubernetes-native way to guarantee way availability of the fluentd Pods.
Additional context
https://kubernetes.io/docs/tasks/run-application/configure-pdb/#specifying-a-poddisruptionbudget
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions!