From ad96abf49b64056d5776c7f074a8e6ff6477bcc7 Mon Sep 17 00:00:00 2001 From: Val Hendrix Date: Wed, 12 Feb 2025 15:57:46 -0800 Subject: [PATCH] feat: add support for hostPath volume in indexer - Adds `hostPath` configuration in `values.yaml` to allow using a hostPath volume for the index worker. - Updates `deployment.yaml` to conditionally use `hostPath` if specified, otherwise fallback to `PersistentVolumeClaim`. Closes #164 --- helm/templates/deployment.yaml | 8 +++++++- helm/values.yaml | 9 +++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/helm/templates/deployment.yaml b/helm/templates/deployment.yaml index 587ad80c..7c27ceaf 100644 --- a/helm/templates/deployment.yaml +++ b/helm/templates/deployment.yaml @@ -133,10 +133,16 @@ spec: configMap: name: {{ .Release.Name }}-indexer-configfiles defaultMode: 0644 - - name: indexer-metacat-pv + - name: indexer-metacat-pv + {{- if and .Values.persistence.hostPath .Values.persistence.hostPath.path }} + hostPath: + path: {{ tpl .Values.persistence.hostPath.path . }} + type: {{ .Values.persistence.hostPath.type }} + {{- else }} persistentVolumeClaim: claimName: {{ include "idxworker.shared.claimName" . }} readOnly: true + {{- end }} - name: {{ .Release.Name }}-temp-tripledb-volume ephemeral: volumeClaimTemplate: diff --git a/helm/values.yaml b/helm/values.yaml index 983dff71..e94145a2 100644 --- a/helm/values.yaml +++ b/helm/values.yaml @@ -124,6 +124,15 @@ persistence: ## subPath: "" + ## @param persistence.hostPath Use a hostPath volume for the index worker. + ## This will override the claimName and use the mountPath settings. + hostPath: + ## @param persistence.hostPath.path The path on the host to use for the hostPath volume + path: "" + ## @param persistence.hostPath.type The type of hostPath volume to use + type: Directory + + ## @section IndexWorker properties ## idxworker: