mirror of
https://github.com/mastodon/chart
synced 2025-03-14 21:11:50 +00:00
Add configurable PodDisruptionBudget for web & streaming (#133)
This commit is contained in:
parent
ce837a852a
commit
2c6a62a4ec
19
templates/pdb-streaming.yaml
Normal file
19
templates/pdb-streaming.yaml
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
{{- if .Values.mastodon.streaming.pdb.enable }}
|
||||||
|
apiVersion: policy/v1
|
||||||
|
kind: PodDisruptionBudget
|
||||||
|
metadata:
|
||||||
|
name: {{ include "mastodon.fullname" . }}-streaming
|
||||||
|
labels:
|
||||||
|
{{- include "mastodon.labels" . | nindent 4 }}
|
||||||
|
spec:
|
||||||
|
{{- if .Values.mastodon.streaming.pdb.minAvailable }}
|
||||||
|
minAvailable: {{ .Values.mastodon.streaming.pdb.minAvailable }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if .Values.mastodon.streaming.pdb.maxUnavailable }}
|
||||||
|
maxUnavailable: {{ .Values.mastodon.streaming.pdb.maxUnavailable }}
|
||||||
|
{{- end }}
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
{{- include "mastodon.selectorLabels" . | nindent 6 }}
|
||||||
|
app.kubernetes.io/component: streaming
|
||||||
|
{{- end }}
|
20
templates/pdb-web.yaml
Normal file
20
templates/pdb-web.yaml
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
{{- if .Values.mastodon.web.pdb.enable }}
|
||||||
|
apiVersion: policy/v1
|
||||||
|
kind: PodDisruptionBudget
|
||||||
|
metadata:
|
||||||
|
name: {{ include "mastodon.fullname" . }}-web
|
||||||
|
labels:
|
||||||
|
{{- include "mastodon.labels" . | nindent 4 }}
|
||||||
|
spec:
|
||||||
|
{{- if .Values.mastodon.web.pdb.minAvailable }}
|
||||||
|
minAvailable: {{ .Values.mastodon.web.pdb.minAvailable }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if .Values.mastodon.web.pdb.maxUnavailable }}
|
||||||
|
maxUnavailable: {{ .Values.mastodon.web.pdb.maxUnavailable }}
|
||||||
|
{{- end }}
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
{{- include "mastodon.selectorLabels" . | nindent 6 }}
|
||||||
|
app.kubernetes.io/component: web
|
||||||
|
app.kubernetes.io/part-of: rails
|
||||||
|
{{- end }}
|
12
values.yaml
12
values.yaml
|
@ -237,6 +237,13 @@ mastodon:
|
||||||
# requests:
|
# requests:
|
||||||
# cpu: 250m
|
# cpu: 250m
|
||||||
# memory: 128Mi
|
# memory: 128Mi
|
||||||
|
# -- PodDisruptionBudget configuration - See https://kubernetes.io/docs/tasks/run-application/configure-pdb/
|
||||||
|
pdb:
|
||||||
|
enable: false
|
||||||
|
# minAvailable: 1
|
||||||
|
# maxUnavailable: 1
|
||||||
|
# -- Puma-specific options. Below values are based on default behavior in
|
||||||
|
# config/puma.rb when no custom values are provided.
|
||||||
# -- Self-signed certificate(s) the (Node.js) needs to trust to connect to e.g. the database
|
# -- Self-signed certificate(s) the (Node.js) needs to trust to connect to e.g. the database
|
||||||
extraCerts: {}
|
extraCerts: {}
|
||||||
# -- Secret containing a key "ca.crt" holding one or more root certificates in PEM format
|
# -- Secret containing a key "ca.crt" holding one or more root certificates in PEM format
|
||||||
|
@ -265,6 +272,11 @@ mastodon:
|
||||||
# requests:
|
# requests:
|
||||||
# cpu: 250m
|
# cpu: 250m
|
||||||
# memory: 768Mi
|
# memory: 768Mi
|
||||||
|
# -- PodDisruptionBudget configuration - See https://kubernetes.io/docs/tasks/run-application/configure-pdb/
|
||||||
|
pdb:
|
||||||
|
enable: false
|
||||||
|
# minAvailable: 1
|
||||||
|
# maxUnavailable: 1
|
||||||
# -- Puma-specific options. Below values are based on default behavior in
|
# -- Puma-specific options. Below values are based on default behavior in
|
||||||
# config/puma.rb when no custom values are provided.
|
# config/puma.rb when no custom values are provided.
|
||||||
minThreads: "5"
|
minThreads: "5"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user