diff options
author | Starfall <us@starfall.systems> | 2021-02-26 22:07:00 -0600 |
---|---|---|
committer | Starfall <us@starfall.systems> | 2021-02-26 22:07:00 -0600 |
commit | 033b1b5b900babc9b068ddad0ae644c5f15e9ffe (patch) | |
tree | 76a4d5f8890836e855cccdf4ad7d58fd9c0159ee /chart/templates/job-assets-precompile.yaml | |
parent | 35f9f9565e142b8c8e7541549046bad679f1438d (diff) | |
parent | 4aa860b65bd796b09dc0ceffa1fdd7de31060a34 (diff) |
Merge remote-tracking branch 'glitchsoc/main' into main
Diffstat (limited to 'chart/templates/job-assets-precompile.yaml')
-rw-r--r-- | chart/templates/job-assets-precompile.yaml | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/chart/templates/job-assets-precompile.yaml b/chart/templates/job-assets-precompile.yaml index 5472e06d6..825a7e916 100644 --- a/chart/templates/job-assets-precompile.yaml +++ b/chart/templates/job-assets-precompile.yaml @@ -14,9 +14,10 @@ spec: name: {{ include "mastodon.fullname" . }}-assets-precompile spec: restartPolicy: Never + {{- if (not .Values.mastodon.s3.enabled) }} # ensure we run on the same node as the other rails components; only # required when using PVCs that are ReadWriteOnce - {{- if or (eq "ReadWriteOnce" .Values.persistence.assets.accessMode) (eq "ReadWriteOnce" .Values.persistence.system.accessMode) }} + {{- if or (eq "ReadWriteOnce" .Values.mastodon.persistence.assets.accessMode) (eq "ReadWriteOnce" .Values.mastodon.persistence.system.accessMode) }} affinity: podAffinity: requiredDuringSchedulingIgnoredDuringExecution: @@ -35,6 +36,7 @@ spec: - name: system persistentVolumeClaim: claimName: {{ template "mastodon.fullname" . }}-system + {{- end }} containers: - name: {{ include "mastodon.fullname" . }}-assets-precompile image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" @@ -53,7 +55,11 @@ spec: - name: "DB_PASS" valueFrom: secretKeyRef: + {{- if .Values.postgresql.enabled }} name: {{ .Release.Name }}-postgresql + {{- else }} + name: {{ template "mastodon.fullname" . }} + {{- end }} key: postgresql-password - name: "REDIS_PASSWORD" valueFrom: @@ -61,9 +67,11 @@ spec: name: {{ .Release.Name }}-redis key: redis-password - name: "PORT" - value: {{ .Values.application.web.port | quote }} + value: {{ .Values.mastodon.web.port | quote }} + {{- if (not .Values.mastodon.s3.enabled) }} volumeMounts: - name: assets mountPath: /opt/mastodon/public/assets - name: system mountPath: /opt/mastodon/public/system + {{- end }} |