mirror of
https://github.com/truenas/charts.git
synced 2026-05-12 03:26:08 +08:00
35 lines
1.3 KiB
YAML
35 lines
1.3 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 }}
|
|
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.runAsUser }}:{{ .Values.runAsGroup }}
|
|
- {{ .Values.appVolumeMounts.netdatacache.mountPath }}
|
|
- {{ .Values.appVolumeMounts.netdatalib.mountPath }}
|
|
- {{ .Values.appVolumeMounts.netdataconfig.mountPath }}
|
|
volumeMounts: {{ include "common.storage.configureAppVolumeMountsInContainer" .Values | nindent 12 }}
|
|
volumes: {{ include "common.storage.configureAppVolumes" .Values | nindent 8 }}
|