Set up JVM Arguments for Application Containers
This topic illustrates on how to set up JVM arguments for application containers.
After setup the Deploy will start with additional JVM argument on the Deploy Java process, in this example: -DsystemProperty=value.
note
MAX_RAM_PERCENTAGE configuration is supported for Deploy, Central Configuration (CC), and Task Engine containers, enabling better control over JVM heap memory allocation.
How to Set up JVM Arguments
- Update the Deploy CR yaml file by running the following command for specific components:
Central configuration
kubectl patch -n digitalai digitalaideploys.xld.digital.ai dai-xld \
--type=merge --patch '{"spec": {"centralConfiguration": {"jvmArgs": "-DsystemProperty=value"}}}'
Master
kubectl patch -n digitalai digitalaideploys.xld.digital.ai dai-xld \
--type=merge --patch '{"spec": {"master": {"jvmArgs": "-DsystemProperty=value"}}}'
Worker
kubectl patch -n digitalai digitalaideploys.xld.digital.ai dai-xld \
--type=merge --patch '{"spec": {"worker": {"jvmArgs": "-DsystemProperty=value"}}}'
- To apply the changes, restart the Deploy pods.
kubectl delete sts dai-xld-digitalai-deploy-master -n digitalai
kubectl delete sts dai-xld-digitalai-deploy-worker -n digitalai
- The CR yaml file will now have a new
jvmArgssection.
kubectl get Digitalaideploys dai-xld -n digitalai -o jsonpath='{.spec.centralConfiguration.jvmArgs}'
kubectl get Digitalaideploys dai-xld -n digitalai -o jsonpath='{.spec.master.jvmArgs}'
kubectl get Digitalaideploys dai-xld -n digitalai -o jsonpath='{.spec.worker.jvmArgs}'
- The restarted pod process will start using the new system property.
To return the setup to the application, set the
jvmArgsto an empty string.