diff options
author | Claire <claire.github-309c@sitedethib.com> | 2021-02-22 19:36:03 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-22 19:36:03 +0100 |
commit | 4aa860b65bd796b09dc0ceffa1fdd7de31060a34 (patch) | |
tree | 8850793f3118de3a91e2e224bcec9651e023acd0 /chart/templates/job-create-admin.yaml | |
parent | 8792128f38e19b0d7882468a4f1f9362b98793a0 (diff) | |
parent | 6ae04d990c50c12e171fc2a3d2593fa42d9c4c9c (diff) |
Merge pull request #1501 from ClearlyClaire/glitch-soc/merge-upstream
Merge upstream changes
Diffstat (limited to 'chart/templates/job-create-admin.yaml')
-rw-r--r-- | chart/templates/job-create-admin.yaml | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/chart/templates/job-create-admin.yaml b/chart/templates/job-create-admin.yaml index 3c5bdd6eb..ffb8bb059 100644 --- a/chart/templates/job-create-admin.yaml +++ b/chart/templates/job-create-admin.yaml @@ -1,4 +1,4 @@ -{{- if .Values.createAdmin.enabled }} +{{- if .Values.mastodon.createAdmin.enabled }} apiVersion: batch/v1 kind: Job metadata: @@ -15,9 +15,10 @@ spec: name: {{ include "mastodon.fullname" . }}-create-admin 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: @@ -36,6 +37,7 @@ spec: - name: system persistentVolumeClaim: claimName: {{ template "mastodon.fullname" . }}-system + {{- end }} containers: - name: {{ include "mastodon.fullname" . }}-create-admin image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" @@ -44,9 +46,9 @@ spec: - bin/tootctl - accounts - create - - {{ .Values.createAdmin.username }} + - {{ .Values.mastodon.createAdmin.username }} - --email - - {{ .Values.createAdmin.email }} + - {{ .Values.mastodon.createAdmin.email }} - --confirmed - --role - admin @@ -59,7 +61,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: @@ -67,10 +73,12 @@ 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 }} {{- end }} |