diff --git a/charts/chia/1.1.0/questions.yaml b/charts/chia/1.1.0/questions.yaml index 94b89a084e..30fd657aeb 100644 --- a/charts/chia/1.1.0/questions.yaml +++ b/charts/chia/1.1.0/questions.yaml @@ -79,3 +79,28 @@ questions: schema: type: hostpath required: true + + - variable: extraAppVolumeMounts + label: "Chia Extra Host Path Volumes" + group: "Storage" + schema: + type: list + items: + - variable: extraAppVolume + label: "Chia Host Path Volume" + description: "Add an extra host path volume for chia application" + schema: + type: dict + attrs: + - variable: mountPath + label: "Mount Path in Pod" + description: "Path where the volume will be mounted inside the pod" + schema: + type: path + required: true + - variable: hostPath + label: "Host Path" + description: "Host path" + schema: + type: hostpath + required: true diff --git a/charts/chia/1.1.0/templates/deployment.yaml b/charts/chia/1.1.0/templates/deployment.yaml index abd836d571..e47a45386b 100644 --- a/charts/chia/1.1.0/templates/deployment.yaml +++ b/charts/chia/1.1.0/templates/deployment.yaml @@ -18,11 +18,20 @@ spec: containers: - name: {{ .Chart.Name }} {{ include "common.containers.imageConfig" .Values.image | nindent 10 }} - {{ include "common.storage.allContainerVolumeMounts" .Values | nindent 10 }} + volumeMounts: {{ include "common.storage.configureAppVolumeMountsInContainer" .Values | nindent 12 }} + {{ range $index, $hostPathConfiguration := .Values.extraAppVolumeMounts }} + - name: extrappvolume-{{ $index }} + mountPath: {{ $hostPathConfiguration.mountPath }} + {{ end }} ports: - name: chia-network protocol: TCP containerPort: 8444 hostPort: 8444 {{ include "common.containers.allEnvironmentVariables" .Values | nindent 10 }} -{{ include "common.storage.allAppVolumes" .Values | nindent 6 }} + volumes: {{ include "common.storage.configureAppVolumes" .Values | nindent 8 }} + {{ range $index, $hostPathConfiguration := .Values.extraAppVolumeMounts }} + - name: extrappvolume-{{ $index }} + hostPath: + path: {{ $hostPathConfiguration.hostPath }} + {{ end }}