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
  • Loading branch information
gsautner committed Apr 15, 2024
1 parent 8f46473 commit 223f429
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 7 deletions.
2 changes: 1 addition & 1 deletion charts/xwiki/Chart.yaml
@@ -1,7 +1,7 @@
apiVersion: v2
description: XWiki is a free wiki software platform written in Java with a design emphasis on extensibility. XWiki is an enterprise wiki. It includes WYSIWYG editing, OpenDocument based document import/export, semantic annotations and tagging, and advanced permissions management.
name: xwiki
version: 1.3.0
version: 1.3.1-Beta.0
type: application
keywords:
- xwiki
Expand Down
19 changes: 13 additions & 6 deletions charts/xwiki/templates/initialization-configmaps.yaml
Expand Up @@ -136,12 +136,19 @@ data:
{{- end }}
export JAVA_OPTIONS="${JAVA_OPTS}"
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
{{- end }}
export JAVA_OPTS="${JAVA_OPTS} @/tmp/java_opts.txt"
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 }}"
{{- 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
{{- end }}
export JAVA_OPTS="${JAVA_OPTS} @/tmp/java_opts.txt"
fi
fi
exec /usr/local/bin/docker-entrypoint.sh xwiki
Expand Down

0 comments on commit 223f429

Please sign in to comment.