diff --git a/templates/pdb-streaming.yaml b/templates/pdb-streaming.yaml new file mode 100644 index 0000000..5b8eda3 --- /dev/null +++ b/templates/pdb-streaming.yaml @@ -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 }} diff --git a/templates/pdb-web.yaml b/templates/pdb-web.yaml new file mode 100644 index 0000000..e319157 --- /dev/null +++ b/templates/pdb-web.yaml @@ -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 }} diff --git a/values.yaml b/values.yaml index c1d5af7..e485f76 100644 --- a/values.yaml +++ b/values.yaml @@ -237,6 +237,13 @@ mastodon: # requests: # cpu: 250m # 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 extraCerts: {} # -- Secret containing a key "ca.crt" holding one or more root certificates in PEM format @@ -265,6 +272,11 @@ mastodon: # requests: # cpu: 250m # 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 # config/puma.rb when no custom values are provided. minThreads: "5"