mirror of
https://github.com/mastodon/chart
synced 2025-05-18 13:03:21 +00:00
allow for an existingClaim for both assets and system
This commit is contained in:
parent
b41e75092b
commit
0e729406c3
|
@ -15,7 +15,7 @@ type: application
|
|||
# This is the chart version. This version number should be incremented each time you make changes
|
||||
# to the chart and its templates, including the app version.
|
||||
# Versions are expected to follow Semantic Versioning (https://semver.org/)
|
||||
version: 4.0.9
|
||||
version: 4.1.0
|
||||
|
||||
# This is the version number of the application being deployed. This version number should be
|
||||
# incremented each time you make changes to the application. Versions are not expected to
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# mastodon
|
||||
|
||||
  
|
||||
  
|
||||
|
||||
Mastodon is a free, open-source social network server based on ActivityPub.
|
||||
|
||||
|
@ -45,8 +45,10 @@ Mastodon is a free, open-source social network server based on ActivityPub.
|
|||
| mastodon.locale | string | `"en"` | available locales: https://github.com/mastodon/mastodon/blob/main/config/application.rb#L71 |
|
||||
| mastodon.metrics.statsd.address | string | `""` | Enable statsd publishing via STATSD_ADDR environment variable |
|
||||
| mastodon.persistence.assets.accessMode | string | `"ReadWriteOnce"` | ReadWriteOnce is more widely supported than ReadWriteMany, but limits scalability, since it requires the Rails and Sidekiq pods to run on the same node. |
|
||||
| mastodon.persistence.assets.existingClaim | string | `nil` | name of existing persistent volume claim to use for assets |
|
||||
| mastodon.persistence.assets.resources.requests.storage | string | `"10Gi"` | |
|
||||
| mastodon.persistence.system.accessMode | string | `"ReadWriteOnce"` | |
|
||||
| mastodon.persistence.system.existingClaim | string | `nil` | name of existing persistent volume claim to use for system |
|
||||
| mastodon.persistence.system.resources.requests.storage | string | `"100Gi"` | |
|
||||
| mastodon.preparedStatements | bool | `true` | |
|
||||
| mastodon.s3.access_key | string | `""` | |
|
||||
|
|
|
@ -73,6 +73,28 @@ Create the name of the service account to use
|
|||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Create the name of the assets persistent volume to use
|
||||
*/}}
|
||||
{{- define "mastodon.pvc.assets" -}}
|
||||
{{- if .Values.mastodon.persistence.assets.existingClaim }}
|
||||
{{- printf "%s" (tpl .Values.mastodon.persistence.assets.existingClaim $) -}}
|
||||
{{- else -}}
|
||||
{{- printf "%s-assets" (include "common.names.fullname" .) -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Create the name of the system persistent volume to use
|
||||
*/}}
|
||||
{{- define "mastodon.pvc.system" -}}
|
||||
{{- if .Values.mastodon.persistence.system.existingClaim }}
|
||||
{{- printf "%s" (tpl .Values.mastodon.persistence.system.existingClaim $) -}}
|
||||
{{- else -}}
|
||||
{{- printf "%s-system" (include "common.names.fullname" .) -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Create a default fully qualified name for dependent services.
|
||||
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
|
||||
|
|
|
@ -36,10 +36,10 @@ spec:
|
|||
volumes:
|
||||
- name: assets
|
||||
persistentVolumeClaim:
|
||||
claimName: {{ template "mastodon.fullname" . }}-assets
|
||||
claimName: {{ template "mastodon.pvc.assets" . }}
|
||||
- name: system
|
||||
persistentVolumeClaim:
|
||||
claimName: {{ template "mastodon.fullname" . }}-system
|
||||
claimName: {{ template "mastodon.pvc.system" . }}
|
||||
{{- end }}
|
||||
containers:
|
||||
- name: {{ include "mastodon.fullname" . }}-media-remove
|
||||
|
|
|
@ -58,10 +58,10 @@ spec:
|
|||
volumes:
|
||||
- name: assets
|
||||
persistentVolumeClaim:
|
||||
claimName: {{ template "mastodon.fullname" $context }}-assets
|
||||
claimName: {{ template "mastodon.pvc.assets" $context }}
|
||||
- name: system
|
||||
persistentVolumeClaim:
|
||||
claimName: {{ template "mastodon.fullname" $context }}-system
|
||||
claimName: {{ template "mastodon.pvc.system" $context }}
|
||||
{{- end }}
|
||||
containers:
|
||||
- name: {{ $context.Chart.Name }}
|
||||
|
|
|
@ -41,10 +41,10 @@ spec:
|
|||
volumes:
|
||||
- name: assets
|
||||
persistentVolumeClaim:
|
||||
claimName: {{ template "mastodon.fullname" . }}-assets
|
||||
claimName: {{ template "mastodon.pvc.assets" . }}
|
||||
- name: system
|
||||
persistentVolumeClaim:
|
||||
claimName: {{ template "mastodon.fullname" . }}-system
|
||||
claimName: {{ template "mastodon.pvc.system" . }}
|
||||
{{- end }}
|
||||
containers:
|
||||
- name: {{ .Chart.Name }}-web
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
apiVersion: batch/v1
|
||||
kind: Job
|
||||
metadata:
|
||||
name: {{ include "mastodon.fullname" . }}-assets-precompile
|
||||
name: {{ include "mastodon.pvc.assets" . }}-precompile
|
||||
labels:
|
||||
{{- include "mastodon.labels" . | nindent 4 }}
|
||||
annotations:
|
||||
|
@ -11,7 +11,7 @@ metadata:
|
|||
spec:
|
||||
template:
|
||||
metadata:
|
||||
name: {{ include "mastodon.fullname" . }}-assets-precompile
|
||||
name: {{ include "mastodon.pvc.assets" . }}-precompile
|
||||
{{- with .Values.jobAnnotations }}
|
||||
annotations:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
|
@ -36,13 +36,13 @@ spec:
|
|||
volumes:
|
||||
- name: assets
|
||||
persistentVolumeClaim:
|
||||
claimName: {{ template "mastodon.fullname" . }}-assets
|
||||
claimName: {{ template "mastodon.pvc.assets" . }}
|
||||
- name: system
|
||||
persistentVolumeClaim:
|
||||
claimName: {{ template "mastodon.fullname" . }}-system
|
||||
claimName: {{ template "mastodon.pvc.system" . }}
|
||||
{{- end }}
|
||||
containers:
|
||||
- name: {{ include "mastodon.fullname" . }}-assets-precompile
|
||||
- name: {{ include "mastodon.pvc.assets" . }}-precompile
|
||||
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||
command:
|
||||
|
|
|
@ -37,10 +37,10 @@ spec:
|
|||
volumes:
|
||||
- name: assets
|
||||
persistentVolumeClaim:
|
||||
claimName: {{ template "mastodon.fullname" . }}-assets
|
||||
claimName: {{ template "mastodon.pvc.assets" . }}
|
||||
- name: system
|
||||
persistentVolumeClaim:
|
||||
claimName: {{ template "mastodon.fullname" . }}-system
|
||||
claimName: {{ template "mastodon.pvc.system" . }}
|
||||
{{- end }}
|
||||
containers:
|
||||
- name: {{ include "mastodon.fullname" . }}-chewy-setup
|
||||
|
|
|
@ -37,10 +37,10 @@ spec:
|
|||
volumes:
|
||||
- name: assets
|
||||
persistentVolumeClaim:
|
||||
claimName: {{ template "mastodon.fullname" . }}-assets
|
||||
claimName: {{ template "mastodon.pvc.assets" . }}
|
||||
- name: system
|
||||
persistentVolumeClaim:
|
||||
claimName: {{ template "mastodon.fullname" . }}-system
|
||||
claimName: {{ template "mastodon.pvc.system" . }}
|
||||
{{- end }}
|
||||
containers:
|
||||
- name: {{ include "mastodon.fullname" . }}-create-admin
|
||||
|
|
|
@ -35,10 +35,10 @@ spec:
|
|||
volumes:
|
||||
- name: assets
|
||||
persistentVolumeClaim:
|
||||
claimName: {{ template "mastodon.fullname" . }}-assets
|
||||
claimName: {{ template "mastodon.pvc.assets" . }}
|
||||
- name: system
|
||||
persistentVolumeClaim:
|
||||
claimName: {{ template "mastodon.fullname" . }}-system
|
||||
claimName: {{ template "mastodon.pvc.system" . }}
|
||||
{{- end }}
|
||||
containers:
|
||||
- name: {{ include "mastodon.fullname" . }}-db-migrate
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{{- if (not .Values.mastodon.s3.enabled) -}}
|
||||
{{- if and (not .Values.mastodon.s3.enabled) (not .Values.mastodon.persistence.assets.existingClaim) -}}
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{{- if (not .Values.mastodon.s3.enabled) -}}
|
||||
{{- if and (not .Values.mastodon.s3.enabled) (not .Values.mastodon.persistence.system.existingClaim) -}}
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
|
|
|
@ -54,11 +54,15 @@ mastodon:
|
|||
resources:
|
||||
requests:
|
||||
storage: 10Gi
|
||||
# -- name of existing persistent volume claim to use for assets
|
||||
existingClaim:
|
||||
system:
|
||||
accessMode: ReadWriteOnce
|
||||
resources:
|
||||
requests:
|
||||
storage: 100Gi
|
||||
# -- name of existing persistent volume claim to use for system
|
||||
existingClaim:
|
||||
s3:
|
||||
enabled: false
|
||||
access_key: ""
|
||||
|
|
Loading…
Reference in New Issue
Block a user