From 520f2cbfca54a56bcf47795293c79c87af5a2ba7 Mon Sep 17 00:00:00 2001 From: Joe Cai Date: Wed, 12 Jun 2019 04:26:20 +1000 Subject: [PATCH] [incubator/solr] add support for extra environment variables (#14614) Signed-off-by: Joe Cai --- incubator/solr/Chart.yaml | 2 +- incubator/solr/README.md | 1 + incubator/solr/templates/statefulset.yaml | 3 +++ incubator/solr/values.yaml | 3 +++ 4 files changed, 8 insertions(+), 1 deletion(-) diff --git a/incubator/solr/Chart.yaml b/incubator/solr/Chart.yaml index 205a404854..56799ad687 100644 --- a/incubator/solr/Chart.yaml +++ b/incubator/solr/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: "v1" name: "solr" -version: "1.0.0" +version: "1.0.1" appVersion: "7.6.0" description: "A helm chart to install Apache Solr: http://lucene.apache.org/solr/" keywords: diff --git a/incubator/solr/README.md b/incubator/solr/README.md index cef0a03342..7ef21a3c37 100644 --- a/incubator/solr/README.md +++ b/incubator/solr/README.md @@ -30,6 +30,7 @@ The following table shows the configuration options for the Solr helm chart: | `replicaCount` | The number of replicas in the Solr statefulset | `3` | | `javaMem` | JVM memory settings to pass to Solr | `-Xms2g -Xmx3g` | | `resources` | Resource limits and requests to set on the solr pods | `{}` | +| `extraEnvVars` | Additional environment variables to set on the solr pods (in yaml syntax) | `[]` | | `terminationGracePeriodSeconds` | The termination grace period of the Solr pods | `180`| | `image.repository` | The repository to pull the docker image from| `solr` | | `image.tag` | The tag on the repository to pull | `7.6.0` | diff --git a/incubator/solr/templates/statefulset.yaml b/incubator/solr/templates/statefulset.yaml index 5c259be918..3de2c3c53c 100644 --- a/incubator/solr/templates/statefulset.yaml +++ b/incubator/solr/templates/statefulset.yaml @@ -149,6 +149,9 @@ spec: value: "{{ include "solr.zookeeper-name" . }}:2181" - name: "SOLR_LOG_LEVEL" value: "{{ .Values.logLevel }}" +{{- if .Values.extraEnvVars }} +{{ toYaml .Values.extraEnvVars | indent 12 }} +{{- end }} {{ if .Values.tls.enabled }} - name: "SOLR_SSL_ENABLED" value: "true" diff --git a/incubator/solr/values.yaml b/incubator/solr/values.yaml index dacd5c9ab9..214152ba83 100644 --- a/incubator/solr/values.yaml +++ b/incubator/solr/values.yaml @@ -12,6 +12,9 @@ javaMem: "-Xms2g -Xmx3g" # Set the limits and requests on solr pod resources resources: {} +# Extra environment variables - allows yaml definitions +extraEnvVars: [] + # Sets the termination Grace period for the solr pods # This can take a while for shards to elect new leaders terminationGracePeriodSeconds: 180