About Readiness Probes for Non-Replicated Configurations

For non-replicated configurations, the TimesTen Operator provides one definition of ready and one associated readiness probe. The definition is as follows: A TimesTen database is considered ready if it is loaded and open for connections. The TimesTen Operator provides the /tmp/readiness readiness probe for this definition of ready.

The TimesTen Operator creates and manages a file called /tmp/readiness in the tt container's file system to determines if the container is ready. If the /tmp/readiness file exists, the tt container is ready. If the file does not exist, the tt container is not ready.

By default, the TimesTen Operator provides and defines this /tmp/readiness readiness probe for non-replicated TimesTenClassic objects. The definition is in YAML format and is as follows:

readinessProbe:
 exec:
   command: 
   - cat
   - /tmp/readiness
 failureThreshold: 1
 periodSeconds: 10
 successThreshold: 1

In this example, Kubernetes runs the cat command in the tt container every 10 seconds. If the command exits with a return code of 0, the container is ready. If the command returns any other value, the container is not ready.

Defining a readiness probe in this manner ensures that Kubernetes Services routes incoming client/server connections to databases that are working and that can be read and written. For more information about client/server connections, see About Using Client/Server Drivers.

You have the option of defining your own readiness probe. If you do so, the TimesTen Operator uses your readiness probe rather than the provided one.