mirror of
https://github.com/mastodon/chart
synced 2025-03-15 21:41:50 +00:00
Custom docker images and database configs (#110)
This commit is contained in:
parent
61b643b05d
commit
0c7466501c
|
@ -70,11 +70,16 @@ spec:
|
|||
claimName: {{ template "mastodon.fullname" $context }}-system
|
||||
{{- end }}
|
||||
{{- include "mastodon.statsdExporterVolume" $ | indent 8 }}
|
||||
{{- if dig "customDatabaseConfigYml" "configMapRef" "name" false . }}
|
||||
- name: config-database-yml
|
||||
configMap:
|
||||
name: {{ .customDatabaseConfigYml.configMapRef.name }}
|
||||
{{- end }}
|
||||
containers:
|
||||
- name: {{ $context.Chart.Name }}
|
||||
securityContext:
|
||||
{{- toYaml $context.Values.mastodon.sidekiq.securityContext | nindent 12 }}
|
||||
image: "{{ $context.Values.image.repository }}:{{ $context.Values.image.tag | default $context.Chart.AppVersion }}"
|
||||
image: "{{ coalesce (dig "image" "repository" false .) $context.Values.image.repository }}:{{ coalesce (dig "image" "tag" false .) $context.Values.image.tag $context.Chart.AppVersion }}"
|
||||
imagePullPolicy: {{ $context.Values.image.pullPolicy }}
|
||||
command:
|
||||
- bundle
|
||||
|
@ -146,6 +151,11 @@ spec:
|
|||
- name: system
|
||||
mountPath: /opt/mastodon/public/system
|
||||
{{- end }}
|
||||
{{- if dig "customDatabaseConfigYml" "configMapRef" "name" false . }}
|
||||
- name: config-database-yml
|
||||
mountPath: /opt/mastodon/config/database.yml
|
||||
subPath: {{ .customDatabaseConfigYml.configMapRef.key }}
|
||||
{{- end }}
|
||||
resources:
|
||||
{{- toYaml (default (default $context.Values.resources $context.Values.mastodon.sidekiq.resources) .resources) | nindent 12 }}
|
||||
{{- include "mastodon.statsdExporterContainer" $ | indent 8 }}
|
||||
|
|
|
@ -42,7 +42,7 @@ spec:
|
|||
securityContext:
|
||||
{{- toYaml . | nindent 12 }}
|
||||
{{- end }}
|
||||
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
|
||||
image: "{{ coalesce .Values.mastodon.streaming.image.repository .Values.image.repository }}:{{ coalesce .Values.mastodon.streaming.image.tag .Values.image.tag .Chart.AppVersion }}"
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||
command:
|
||||
- node
|
||||
|
|
|
@ -48,6 +48,11 @@ spec:
|
|||
persistentVolumeClaim:
|
||||
claimName: {{ template "mastodon.fullname" . }}-system
|
||||
{{- include "mastodon.statsdExporterVolume" $ | indent 8 }}
|
||||
{{- if .Values.mastodon.web.customDatabaseConfigYml.configMapRef.name }}
|
||||
- name: config-database-yml
|
||||
configMap:
|
||||
name: {{ .Values.mastodon.web.customDatabaseConfigYml.configMapRef.name }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
containers:
|
||||
- name: {{ .Chart.Name }}-web
|
||||
|
@ -55,7 +60,7 @@ spec:
|
|||
securityContext:
|
||||
{{- toYaml . | nindent 12 }}
|
||||
{{- end }}
|
||||
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
|
||||
image: "{{ coalesce .Values.mastodon.web.image.repository .Values.image.repository }}:{{ coalesce .Values.mastodon.web.image.tag .Values.image.tag .Chart.AppVersion }}"
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||
command:
|
||||
- bundle
|
||||
|
@ -130,6 +135,11 @@ spec:
|
|||
- name: system
|
||||
mountPath: /opt/mastodon/public/system
|
||||
{{- end }}
|
||||
{{- if .Values.mastodon.web.customDatabaseConfigYml.configMapRef.name }}
|
||||
- name: config-database-yml
|
||||
mountPath: /opt/mastodon/config/database.yml
|
||||
subPath: {{ .Values.mastodon.web.customDatabaseConfigYml.configMapRef.key }}
|
||||
{{- end }}
|
||||
ports:
|
||||
- name: http
|
||||
containerPort: {{ .Values.mastodon.web.port }}
|
||||
|
|
20
values.yaml
20
values.yaml
|
@ -130,6 +130,14 @@ mastodon:
|
|||
- mailers,2
|
||||
- pull
|
||||
- scheduler # Make sure the scheduler queue only exists once and with a worker that has 1 replica.
|
||||
image:
|
||||
repository:
|
||||
tag:
|
||||
# allows you to mount a custom database.yml from a configmap
|
||||
customDatabaseConfigYml:
|
||||
configMapRef:
|
||||
name:
|
||||
key:
|
||||
#- name: push-pull
|
||||
# concurrency: 50
|
||||
# resources: {}
|
||||
|
@ -166,6 +174,9 @@ mastodon:
|
|||
# password must be located in keys named `login` and `password` respectively.
|
||||
existingSecret:
|
||||
streaming:
|
||||
image:
|
||||
repository:
|
||||
tag:
|
||||
port: 4000
|
||||
# -- this should be set manually since os.cpus() returns the number of CPUs on
|
||||
# the node running the pod, which is unrelated to the resources allocated to
|
||||
|
@ -218,6 +229,15 @@ mastodon:
|
|||
maxThreads: "5"
|
||||
workers: "2"
|
||||
persistentTimeout: "20"
|
||||
image:
|
||||
repository:
|
||||
tag:
|
||||
# allows you to mount a custom database.yml from a configmap
|
||||
# for example if you want to use a read-only replica
|
||||
customDatabaseConfigYml:
|
||||
configMapRef:
|
||||
name:
|
||||
key:
|
||||
|
||||
metrics:
|
||||
statsd:
|
||||
|
|
Loading…
Reference in New Issue
Block a user