obch/charts/gtfso-import/templates/job.yaml

50 lines
1.6 KiB
YAML
Raw Permalink Normal View History

2024-01-08 16:33:18 +00:00
apiVersion: batch/v1
kind: Job
metadata:
name: {{ include "gtfso-import.fullname" . }}
labels:
{{- include "gtfso-import.labels" . | nindent 4 }}
annotations:
helm.sh/hook-delete-policy: before-hook-creation,hook-succeeded
spec:
template:
metadata:
{{- with .Values.podAnnotations }}
annotations:
{{- toYaml . | nindent 8 }}
{{- end }}
labels:
{{- include "gtfso-import.selectorLabels" . | nindent 8 }}
spec:
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
serviceAccountName: {{ include "gtfso-import.serviceAccountName" . }}
securityContext:
{{- toYaml .Values.podSecurityContext | nindent 8 }}
2024-01-08 22:37:20 +00:00
restartPolicy: OnFailure
2024-01-08 16:33:18 +00:00
containers:
- name: {{ .Chart.Name }}
envFrom:
- secretRef:
name: {{ include "gtfso-import.fullname" . }}
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
resources:
{{- toYaml .Values.resources | nindent 12 }}
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}