From 74d23d1758d235d94bcccbd355b9d7f7e715817f Mon Sep 17 00:00:00 2001 From: Tormi Tabor Date: Thu, 28 May 2026 20:40:55 +0300 Subject: [PATCH] feat(GH-534): add additive Solr module env and args --- drupal/templates/solr-statefulset.yaml | 20 ++++++++++++++++++++ drupal/values.schema.json | 3 +++ drupal/values.yaml | 8 ++++++++ 3 files changed, 31 insertions(+) diff --git a/drupal/templates/solr-statefulset.yaml b/drupal/templates/solr-statefulset.yaml index 2334cc2a..2db8f7e3 100644 --- a/drupal/templates/solr-statefulset.yaml +++ b/drupal/templates/solr-statefulset.yaml @@ -38,10 +38,30 @@ spec: ports: - containerPort: 8983 command: {{ .Values.solr.command }} + {{- if or .Values.solr.modules .Values.solr.extraEnv }} + env: + {{- if .Values.solr.modules }} + - name: SOLR_MODULES + value: {{ join "," .Values.solr.modules | quote }} + {{- end }} + {{- with .Values.solr.extraEnv }} + {{- if kindIs "map" . }} + {{- range $key, $val := . }} + - name: {{ $key }} + value: {{ $val | quote }} + {{- end }} + {{- else }} + {{- toYaml . | nindent 8 }} + {{- end }} + {{- end }} + {{- end }} args: {{- range .Values.solr.commandArgs }} - {{ . | quote }} {{- end }} + {{- range .Values.solr.extraCommandArgs }} + - {{ . | quote }} + {{- end }} livenessProbe: httpGet: scheme: HTTP diff --git a/drupal/values.schema.json b/drupal/values.schema.json index b58ef322..adbb8e6e 100644 --- a/drupal/values.schema.json +++ b/drupal/values.schema.json @@ -726,6 +726,9 @@ "imageTag": { "type": ["string", "integer"] }, "command": { "type": "array" }, "commandArgs": { "type": "array" }, + "modules": { "type": "array", "items": { "type": "string" } }, + "extraEnv": { "type": ["array", "object", "null"] }, + "extraCommandArgs": { "type": "array", "items": { "type": "string" } }, "confLocation": { "type": "string" }, "coreName": { "type": "string" }, "readinessProbeUrl": { "type": "string" }, diff --git a/drupal/values.yaml b/drupal/values.yaml index b07f6e55..26808f44 100644 --- a/drupal/values.yaml +++ b/drupal/values.yaml @@ -905,6 +905,14 @@ solr: "-m", "256m", "-a", "-Dlog4j2.formatMsgNoLookups=true -XX:+ExitOnOutOfMemoryError -XX:+HeapDumpOnOutOfMemoryError" ] + # Additive module list rendered as SOLR_MODULES. + # Example: ["extraction", "langid", "ltr", "analysis-extras"] + modules: [] + # Additive environment variables for Solr container. + # Supports either env list format or a key-value map. + extraEnv: null + # Additive command arguments appended after commandArgs. + extraCommandArgs: [] # Path in php container containing solr conf files (schema, solrconfig, stopwords, etc.). # Solr init container will contents of this folder to actual solr container.