feat: Add pod disruption budget to helm chart
Now it is possible to define the pod disruption budget. Closes: #8222
This commit is contained in:
parent
918c011e33
commit
08e1566490
|
@ -0,0 +1,18 @@
|
|||
{{- if and (.Values.pdb.enabled) (.Capabilities.APIVersions.Has "policy/v1/PodDisruptionBudget") }}
|
||||
apiVersion: policy/v1
|
||||
kind: PodDisruptionBudget
|
||||
metadata:
|
||||
name: {{ include "emqx.fullname" . }}-pdb
|
||||
namespace: {{ .Release.Namespace }}
|
||||
labels:
|
||||
app.kubernetes.io/name: {{ include "emqx.name" . }}
|
||||
helm.sh/chart: {{ include "emqx.chart" . }}
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
||||
spec:
|
||||
maxUnavailable: {{ .Values.pdb.maxUnavailable }}
|
||||
selector:
|
||||
matchLabels:
|
||||
app.kubernetes.io/name: {{ include "emqx.name" . }}
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
{{- end }}
|
|
@ -211,3 +211,10 @@ ssl:
|
|||
issuer:
|
||||
name: letsencrypt-dns
|
||||
kind: ClusterIssuer
|
||||
|
||||
## Setting PodDisruptionBudget.
|
||||
## ref: https://kubernetes.io/docs/tasks/run-application/configure-pdb
|
||||
##
|
||||
pdb:
|
||||
enabled: false
|
||||
maxUnavailable: 1
|
||||
|
|
Loading…
Reference in New Issue