Add PodDisruptionBudget

This commit is contained in:
Caleb Woodbine 2021-05-15 20:21:37 +12:00
parent f9aadb39bc
commit 07317f55e1
No known key found for this signature in database
GPG Key ID: 0F955CBFFF314C45
3 changed files with 33 additions and 0 deletions

View File

@ -295,6 +295,9 @@ spec:
minReplicas: 3
maxReplicas: 10
targetCPUUtilizationPercentage: 80
podDisruptionBudget:
enabled: true
minAvailable: 2
ingress:
enabled: true
hosts:

View File

@ -0,0 +1,25 @@
{{ if .Values.podDisruptionBudget.enabled }}
apiVersion: policy/v1beta1
kind: PodDisruptionBudget
metadata:
name: {{ include "plausible-analytics.fullname" . }}
labels:
{{- include "plausible-analytics.labels" . | nindent 4 }}
{{- if .Values.labels }}
{{- with .Values.labels }}
{{- toYaml . | nindent 4 }}
{{- end }}
{{- end }}
annotations:
{{- if .Values.annotations }}
{{- with .Values.annotations }}
{{- toYaml . | nindent 4 }}
{{- end }}
{{- end }}
spec:
minAvailable: {{ .Values.podDisruptionBudget.minAvailable }}
maxUnavailable: {{ .Values.podDisruptionBudget.maxUnavailable }}
selector:
matchLabels:
{{- include "plausible-analytics.selectorLabels" . | nindent 6 }}
{{- end }}

View File

@ -123,6 +123,11 @@ autoscaling:
targetCPUUtilizationPercentage: 80
# targetMemoryUtilizationPercentage: 80
podDisruptionBudget:
enabled: false
minAvailable: 1
# maxUnavailable: 3
nodeSelector: {}
tolerations: []