Skip to main content
Version: Deploy 24.1

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.

How to Set up JVM Arguments

  1. 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"}}}'
  1. 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
  1. The CR yaml file will now have a new jvmArgs section.
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}'
  1. The restarted pod process will start using the new system property. To return the setup to the application, set the jvmArgs to an empty string.