29 lines
972 B
YAML
29 lines
972 B
YAML
{{- if .Values.seedJob.enabled }}
|
|
apiVersion: batch/v1
|
|
kind: Job
|
|
metadata:
|
|
name: seed-admin
|
|
namespace: {{ include "planpal.namespace" . }}
|
|
annotations:
|
|
argocd.argoproj.io/sync-wave: "4"
|
|
# Argo re-runs a Job by hash; a spec change makes a new Job. Delete the old
|
|
# one before sync if it lingers, or set this to a Sync hook if you want it
|
|
# to run every sync. ponytail: kept as a plain waved object, not a hook.
|
|
spec:
|
|
backoffLimit: 10
|
|
ttlSecondsAfterFinished: 300
|
|
template:
|
|
spec:
|
|
serviceAccountName: {{ .Values.serviceAccount.name }}
|
|
restartPolicy: OnFailure
|
|
containers:
|
|
- name: seed-admin
|
|
image: {{ include "planpal.image" (dict "Values" .Values "which" "backend") }}
|
|
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
|
command: {{ toJson .Values.seedJob.command }}
|
|
envFrom:
|
|
{{- range .Values.seedJob.envFrom }}
|
|
- secretRef: { name: {{ . }} }
|
|
{{- end }}
|
|
{{- end }}
|