mirror of
https://github.com/truenas/charts.git
synced 2026-05-04 12:31:19 +08:00
32 lines
1.4 KiB
YAML
32 lines
1.4 KiB
YAML
apiVersion: batch/v1
|
|
kind: Job
|
|
metadata:
|
|
name: "{{ template "common.names.fullname" . }}-preinstall-job"
|
|
labels:
|
|
app.kubernetes.io/managed-by: {{ .Release.Service | quote }}
|
|
app.kubernetes.io/instance: {{ .Release.Name | quote }}
|
|
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
|
|
helm.sh/chart: {{ template "common.names.chart" . }}
|
|
annotations:
|
|
"helm.sh/hook": pre-install
|
|
"helm.sh/hook-delete-policy": hook-succeeded
|
|
spec:
|
|
template:
|
|
metadata:
|
|
name: "{{ template "common.names.fullname" . }}-preinstall-hook"
|
|
labels:
|
|
app.kubernetes.io/managed-by: {{ .Release.Service | quote }}
|
|
app.kubernetes.io/instance: {{ .Release.Name | quote }}
|
|
helm.sh/chart: {{ template "common.names.chart" . }}
|
|
spec:
|
|
restartPolicy: Never
|
|
containers:
|
|
- name: pre-install-job
|
|
image: "alpine:latest"
|
|
command: ["/bin/sh", "-c"]
|
|
args:
|
|
- {{ include "add.user" . }}
|
|
{{ include "change.user.permissions" . }}
|
|
volumeMounts: {{ include "common.storage.configureAppVolumeMountsInContainer" (dict "appVolumeMounts" .Values.elasticSearchAppVolumeMounts ) | nindent 12 }}
|
|
volumes: {{ include "common.storage.configureAppVolumes" (dict "appVolumeMounts" .Values.elasticSearchAppVolumeMounts "emptyDirVolumes" .Values.emptyDirVolumes "ixVolumes" .Values.ixVolumes) | nindent 8 }}
|