From 4d04a81998f1d8deff283ee70d1f3540d8dab53f Mon Sep 17 00:00:00 2001 From: "Guido Wischrop (mgm tp)" <43027257+mgmgwi@users.noreply.github.com> Date: Wed, 14 Dec 2022 10:19:51 +0100 Subject: [PATCH] [bitnami/solr] Add subPath and subPathExpr (#13742) * Add subPath and subPathExpr Signed-off-by: mgmgwi * Bump version Signed-off-by: mgmgwi * Update README.md with readme-generator-for-helm Signed-off-by: Bitnami Containers Signed-off-by: mgmgwi Signed-off-by: Bitnami Containers Co-authored-by: Bitnami Containers --- bitnami/solr/Chart.yaml | 2 +- bitnami/solr/README.md | 2 ++ bitnami/solr/templates/statefulset.yaml | 5 +++++ bitnami/solr/values.yaml | 11 +++++++++++ 4 files changed, 19 insertions(+), 1 deletion(-) diff --git a/bitnami/solr/Chart.yaml b/bitnami/solr/Chart.yaml index 46993b38c..94f85f2c7 100644 --- a/bitnami/solr/Chart.yaml +++ b/bitnami/solr/Chart.yaml @@ -27,4 +27,4 @@ name: solr sources: - https://github.com/bitnami/containers/tree/main/bitnami/solr - https://lucene.apache.org/solr/ -version: 7.0.1 +version: 7.1.0 diff --git a/bitnami/solr/README.md b/bitnami/solr/README.md index 8befc162c..05e22bb21 100644 --- a/bitnami/solr/README.md +++ b/bitnami/solr/README.md @@ -213,6 +213,8 @@ The command removes all the Kubernetes components associated with the chart and | `persistence.size` | Size of data volume | `8Gi` | | `persistence.annotations` | Persistence annotations for Solr | `{}` | | `persistence.mountPath` | Persistence mount path for Solr | `/bitnami/solr` | +| `persistence.subPath` | Path within the volume from which the container's | `""` | +| `persistence.subPathExpr` | Expanded path within the volume from which | `""` | | `persistence.selector` | Selector to match an existing Persistent Volume for WordPress data PVC | `{}` | diff --git a/bitnami/solr/templates/statefulset.yaml b/bitnami/solr/templates/statefulset.yaml index 1d7803e0d..70b13027b 100644 --- a/bitnami/solr/templates/statefulset.yaml +++ b/bitnami/solr/templates/statefulset.yaml @@ -341,6 +341,11 @@ spec: subPath: setup.sh - name: data mountPath: {{ .Values.persistence.mountPath }} + {{- if .Values.persistence.subPath }} + subPath: {{ .Values.persistence.subPath }} + {{- else if .Values.persistence.subPathExpr }} + subPathExpr: {{ .Values.persistence.subPathExpr }} + {{- end }} {{- if .Values.tls.enabled }} - name: shared-certs mountPath: '/opt/bitnami/solr/certs' diff --git a/bitnami/solr/values.yaml b/bitnami/solr/values.yaml index 4d552cab3..b0f94d114 100644 --- a/bitnami/solr/values.yaml +++ b/bitnami/solr/values.yaml @@ -552,6 +552,17 @@ persistence: ## @param persistence.mountPath Persistence mount path for Solr ## mountPath: /bitnami/solr + ## @param persistence.subPath Path within the volume from which the container's + ## volume should be mounted. Defaults to "" (volume's root). + ## + subPath: "" + ## @param persistence.subPathExpr Expanded path within the volume from which + ## the container's volume should be mounted. Behaves similarly to SubPath but + ## environment variable references $(VAR_NAME) are expanded using the + ## container's environment. Defaults to "" (volume's root). + ## SubPathExpr and SubPath are mutually exclusive. + ## + subPathExpr: "" ## @param persistence.selector Selector to match an existing Persistent Volume for WordPress data PVC ## If set, the PVC can't have a PV dynamically provisioned for it ## E.g.