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

18 lines
639 B
YAML
Raw Normal View History

2022-07-27 11:55:46 +00:00
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ template "common.names.fullname" . }}-init
labels:
{{- include "common.labels" . | nindent 4 }}
data:
init.sh: |
#!/bin/bash
if ! octoprint --version 2>/dev/null ; then
mkdir -p /octoprint/tmp ; wget -O- https://github.com/OctoPrint/OctoPrint/archive/refs/tags/1.8.1.tar.gz | tar -xz --strip-components 1 -C /octoprint/tmp ; cd /octoprint/tmp; pip install .
2022-07-27 11:55:46 +00:00
fi
{{- if .Values.octoprint.plugins.install }}
{{- range .Values.octoprint.plugins.plugins }}
pip install{{if $.Values.octoprint.plugins.upgrade }} --upgrade{{ end }} {{.}}
{{- end }}
{{- end }}