Support for agent servers configured with Terminate Server on Idle

About this task

The Sterling Order Management System Software Operator always creates agent and integration servers as Kubernetes deployment resource with a defined replica count. If the JVM running within the pod terminates itself, the deployment controller tries to bring it back to match the replica count. This causes a conflict when the agent servers are configured with Terminate Server on Idle. The following procedure is a work-around to deploy such agent servers such that new pods are not spawned when a JVM terminates itself.
Note: This function is automatically achieved by using specific configurations in Sterling Order Management System Software Operator. For more information, see Configuring OMServer Custom Resource.

Procedure

  1. Copy the deployment resource manifest from an existing agent server deployment.
  2. Modify kind and apiVersion as shown in the following snippet:
    kind: Job
    apiVersion: batch/v1
  3. Ensure the metadata.name is updated to unique name in the namespace.
  4. Remove the spec.selector parameter.
  5. Set spec.template.spec.restartPolicy to Never so that once the job is complete (success or fail), the pod does not restart.
  6. Ensure the agent server name is updated in the command arguments within the job manifest.
  7. Create the resource in the namespace using kubectl create command.