blob: 85af48ac1dc52313e741a6c59f4cee64c8cf2a15 [file] [log] [blame]
Timoney, Dan (dt5972)58774772019-08-21 16:50:54 -04001#!/bin/sh
Jakub Latuseke0e8ca72020-10-21 13:36:29 +02002{{/*
Timoney, Dan (dt5972)58774772019-08-21 16:50:54 -04003#
4# Licensed to the Apache Software Foundation (ASF) under one or more
5# contributor license agreements. See the NOTICE file distributed with
6# this work for additional information regarding copyright ownership.
7# The ASF licenses this file to You under the Apache License, Version 2.0
8# (the "License"); you may not use this file except in compliance with
9# the License. You may obtain a copy of the License at
10#
11# http://www.apache.org/licenses/LICENSE-2.0
12#
13# Unless required by applicable law or agreed to in writing, software
14# distributed under the License is distributed on an "AS IS" BASIS,
15# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16# See the License for the specific language governing permissions and
17# limitations under the License.
18#
19
20#
21# handle specific scripts; the SCRIPT_NAME is exactly the name of the Karaf
22# script: client, instance, shell, start, status, stop, karaf
23#
24# if [ "${KARAF_SCRIPT}" == "SCRIPT_NAME" ]; then
25# Actions go here...
26# fi
27
28#
29# general settings which should be applied for all scripts go here; please keep
30# in mind that it is possible that scripts might be executed more than once, e.g.
31# in example of the start script where the start script is executed first and the
32# karaf script afterwards.
33#
34
35#
36# The following section shows the possible configuration options for the default
37# karaf scripts
38#
39# export JAVA_HOME # Location of Java installation
40# export JAVA_MIN_MEM # Minimum memory for the JVM
41# export JAVA_MAX_MEM # Maximum memory for the JVM
42# export JAVA_PERM_MEM # Minimum perm memory for the JVM
43# export JAVA_MAX_PERM_MEM # Maximum perm memory for the JVM
44# export EXTRA_JAVA_OPTS # Additional JVM options
45# export KARAF_HOME # Karaf home folder
46# export KARAF_DATA # Karaf data folder
47# export KARAF_BASE # Karaf base folder
48# export KARAF_ETC # Karaf etc folder
49# export KARAF_SYSTEM_OPTS # First citizen Karaf options
50# export KARAF_OPTS # Additional available Karaf options
51# export KARAF_DEBUG # Enable debug mode
52# export KARAF_REDIRECT # Enable/set the std/err redirection when using bin/start
53# export KARAF_NOROOT # Prevent execution as root if set to true
Jakub Latuseke0e8ca72020-10-21 13:36:29 +020054*/}}
Timoney, Dan (dt5972)58774772019-08-21 16:50:54 -040055if [ "x$JAVA_MAX_MEM" = "x" ]; then
56 export JAVA_MAX_MEM="2048m"
57fi
58
Dan Timoneya98765b2020-09-14 11:57:55 -040059EXTRA_JAVA_OPTS=${EXTRA_JAVA_OPTS:-"-XX:+UseG1GC \
60 -XX:MaxGCPauseMillis={{.Values.config.odl.javaOptions.maxGCPauseMillis}} \
61 -XX:ParallelGCThreads={{.Values.config.odl.javaOptions.parallelGCThreads}} \
62 -XX:+ParallelRefProcEnabled \
63 -XX:+UseStringDeduplication {{.Values.config.odl.javaOptions.gcLogOptions}}"}