hive-apps/projects/octoprint/chart/templates/common.yaml

35 lines
960 B
YAML
Raw Permalink Normal View History

2022-07-27 11:55:46 +00:00
{{/* Make sure all variables are set properly */}}
{{- include "common.values.setup" . }}
{{/* Append the configMap volume to the volumes */}}
{{- define "octoprint.init" -}}
enabled: "true"
mountPath: "/init.sh"
subPath: "init.sh"
type: "custom"
volumeSpec:
configMap:
name: {{ include "common.names.fullname" . }}-init
defaultMode: 0755
{{- end -}}
{{- define "octoprint.initContainer" -}}
name: init-octoprint
image: {{ .Values.image.repository }}:{{ .Values.image.tag }}
imagePullPolicy: {{ .Values.image.pullPolicy }}
volumeMounts:
- name: data
mountPath: /octoprint
- name: octoprint-init
mountPath: /init.sh
subPath: init.sh
command:
- sh
- -c
- /init.sh
{{- end -}}
{{- $_ := set .Values.persistence "octoprint-init" (include "octoprint.init" . | fromYaml) -}}
{{- $_ := set .Values.initContainers "octoprint-init" (include "octoprint.initContainer" . | fromYaml) -}}
{{/* Render the templates */}}
{{ include "common.all" . }}