mirror of
https://github.com/bitnami/charts.git
synced 2026-03-07 08:07:55 +08:00
[bitnami/mastodon] Improve init-job stability (#28553)
This commit is contained in:
committed by
GitHub
parent
d7f44a3783
commit
befdf07bec
@@ -1,8 +1,12 @@
|
||||
# Changelog
|
||||
|
||||
## 6.2.9 (2024-07-22)
|
||||
## 6.2.10 (2024-07-29)
|
||||
|
||||
* [bitnami/mastodon] Global StorageClass as default value ([#28052](https://github.com/bitnami/charts/pull/28052))
|
||||
* [bitnami/mastodon] Improve init-job stability ([#28553](https://github.com/bitnami/charts/pull/28553))
|
||||
|
||||
## <small>6.2.9 (2024-07-22)</small>
|
||||
|
||||
* [bitnami/mastodon] Global StorageClass as default value (#28052) ([f3ba3c5](https://github.com/bitnami/charts/commit/f3ba3c5c7a1015f0c60a1d13de63bb2bbc43d786)), closes [#28052](https://github.com/bitnami/charts/issues/28052)
|
||||
|
||||
## <small>6.2.8 (2024-07-04)</small>
|
||||
|
||||
|
||||
@@ -49,4 +49,4 @@ maintainers:
|
||||
name: mastodon
|
||||
sources:
|
||||
- https://github.com/bitnami/charts/tree/main/bitnami/mastodon
|
||||
version: 6.2.9
|
||||
version: 6.2.10
|
||||
|
||||
@@ -51,8 +51,23 @@ data:
|
||||
mastodon_ensure_admin_user_exists
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{- if .Values.initJob.precompileAssets }}
|
||||
{{- if .Values.enableS3 }}
|
||||
wait-for-s3.sh: |-
|
||||
#!/bin/bash
|
||||
|
||||
set -o errexit
|
||||
set -o nounset
|
||||
set -o pipefail
|
||||
|
||||
# Load libraries
|
||||
. /opt/bitnami/scripts/libmastodon.sh
|
||||
|
||||
# Load Mastodon environment variables
|
||||
. /opt/bitnami/scripts/mastodon-env.sh
|
||||
|
||||
mastodon_wait_for_s3_connection "$MASTODON_S3_HOSTNAME" "$MASTODON_S3_PORT_NUMBER"
|
||||
{{- end }}
|
||||
precompile-assets.sh: |-
|
||||
#!/bin/bash
|
||||
|
||||
|
||||
@@ -61,6 +61,47 @@ spec:
|
||||
- name: empty-dir
|
||||
mountPath: /public
|
||||
subPath: app-public-dir
|
||||
{{- if and .Values.initJob.precompileAssets .Values.enableS3 }}
|
||||
- name: wait-for-s3
|
||||
image: {{ template "mastodon.image" . }}
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||
command:
|
||||
- /bin/bash
|
||||
- -ec
|
||||
args:
|
||||
- /scripts/wait-for-s3.sh
|
||||
{{- if .Values.initJob.containerSecurityContext.enabled }}
|
||||
securityContext: {{- omit .Values.initJob.containerSecurityContext "enabled" | toYaml | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- if .Values.initJob.resources }}
|
||||
resources: {{- toYaml .Values.initJob.resources | nindent 12 }}
|
||||
{{- else if ne .Values.initJob.resourcesPreset "none" }}
|
||||
resources: {{- include "common.resources.preset" (dict "type" .Values.initJob.resourcesPreset) | nindent 12 }}
|
||||
{{- end }}
|
||||
env:
|
||||
- name: BITNAMI_DEBUG
|
||||
value: {{ ternary "true" "false" (or .Values.image.debug .Values.diagnosticMode.enabled) | quote }}
|
||||
- name: MASTODON_S3_HOSTNAME
|
||||
value: {{ include "mastodon.s3.host" . | quote }}
|
||||
- name: MASTODON_S3_PORT_NUMBER
|
||||
value: {{ include "mastodon.s3.port" . | quote }}
|
||||
- name: MASTODON_AWS_ACCESS_KEY_ID
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: {{ include "mastodon.s3.secretName" . }}
|
||||
key: {{ include "mastodon.s3.accessKeyIDKey" . | quote }}
|
||||
- name: MASTODON_AWS_SECRET_ACCESS_KEY
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: {{ include "mastodon.s3.secretName" . }}
|
||||
key: {{ include "mastodon.s3.secretAccessKeyKey" . | quote }}
|
||||
volumeMounts:
|
||||
- name: empty-dir
|
||||
mountPath: /tmp
|
||||
subPath: tmp-dir
|
||||
- name: scripts
|
||||
mountPath: /scripts
|
||||
{{- end }}
|
||||
containers:
|
||||
# We separate the job in multiple containers to be able to run them in parallel. We put everything on the same job
|
||||
# as it follows the Job Pattern best practices
|
||||
|
||||
Reference in New Issue
Block a user