12345678910111213141516171819202122232425262728293031323334 |
- 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:
- - "chown"
- - "-R"
- - "{{ .Values.ownerUID }}:{{ .Values.ownerGID }}"
- - "{{ .Values.appVolumeMounts.storage.mountPath }}"
- - "{{ .Values.appVolumeMounts.original.mountPath }}"
- - "{{ .Values.appVolumeMounts.import.mountPath }}"
- volumeMounts: {{ include "common.storage.configureAppVolumeMountsInContainer" .Values | nindent 12 }}
- volumes: {{ include "common.storage.configureAppVolumes" .Values | nindent 8 }}
|