fix(geoserver): replace JAVA_OPTS with CATALINA_OPTS - #83
Conversation
|
Yes, it should work well, but loosing the OPTS from the image might be a downside if someone relies on the custom OPTS in a custom image. |
|
@camuffo That is true, but the defaults in helm chart do contain all the flags from the defaults of CATALINA_OPS coming from a standard docker-geoserver image. If this was overridden to something else, they will be lost, yes Perhaps we can have an initContainer check that stops a deployment unless the user explicitly flags it as ok: |
|
How about we do the migration by renaming chart-rendered # statefulset.yaml
spec:
template:
spec:
containers:
- name: {{ .Chart.Name }}
args:
- |
sed 's|/"$APP_LOCATION"/|/|g' /usr/local/bin/geoserver-rest-config.sh > /tmp/geoserver-rest-config.sh
chmod +x /tmp/geoserver-rest-config.sh
sed 's|/usr/local/bin/geoserver-rest-config.sh|/tmp/geoserver-rest-config.sh|g' /entrypoint.sh > /tmp/entrypoint.sh
chmod +x /tmp/entrypoint.sh
+ export CATALINA_OPTS="${HELM_CATALINA_OPTS} ${CATALINA_OPTS}"
exec /tmp/entrypoint.sh
env:
- - name: JAVA_OPTS
+ - name: HELM_CATALINA_OPTS
value: "<chart-rendered JVM opts>"This preserves current precedence: chart options first, image |
Fixes #70
Fixes https://github.com/geosolutions-it/support/issues/6395
By overwriting what comes from the
docker-geoserverimage'sCATALINA_OPTS, we end up with a cleaner deduplicated JAVA_OPTS in the process listing:Tested:
Before
After