Skip to content

Commit

Permalink
HELM-65 Fix java options using old Tomcat/8 images
Browse files Browse the repository at this point in the history
- Fixing quote and var name
  • Loading branch information
gsautner committed Apr 17, 2024
1 parent 223f429 commit f183324
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions charts/xwiki/templates/initialization-configmaps.yaml
Expand Up @@ -131,21 +131,21 @@ data:
if [ -d "/var/lib/jetty" ]; then
echo "" > start.d/xwiki.ini
{{- range $file, $value := .Values.properties }}
echo '-D{{ $file }}={{ $value }}' >> start.d/xwiki.ini
{{- range $prop, $value := .Values.properties }}
echo '-D{{ $prop }}={{ $value }}' >> start.d/xwiki.ini
{{- end }}
export JAVA_OPTIONS="${JAVA_OPTS}"
else
if (/usr/local/tomcat/bin/version.sh | grep -q 'Tomcat/8'); then
echo "Old Tomcat don't support java_opts file... Using normal props."
{{- range $file, $value := .Values.properties }}
export JAVA_OPTS="${JAVA_OPTS} -D{{ $file }}="{{ $value }}"
{{- range $prop, $value := .Values.properties }}
export JAVA_OPTS="${JAVA_OPTS} -D{{ $prop }}={{ $value }}"
{{- end }}
else
## Clear contents of /tmp/java_opts.txt so that we don't add extra arguments at each pod restart.
echo "" > /tmp/java_opts.txt
{{- range $file, $value := .Values.properties }}
echo '-D{{ $file }}="{{ $value }}"' >> /tmp/java_opts.txt
{{- range $prop, $value := .Values.properties }}
echo '-D{{ $prop }}="{{ $value }}"' >> /tmp/java_opts.txt
{{- end }}
export JAVA_OPTS="${JAVA_OPTS} @/tmp/java_opts.txt"
fi
Expand Down

0 comments on commit f183324

Please sign in to comment.