In-Memory DB Provider
The In-Memory DB Provider is responsible for providing access to an in-memory DB instance.
ClowdApp Configuration
To request an in-memory db instance, a ClowdApp
would use the inMemoryDb
stanza, a partial example of which is shown below.
apiVersion: cloud.redhat.com/v1alpha1
kind: ClowdApp
metadata:
name: myapp
spec:
# Other App Config
inMemoryDb: true
ClowdEnv Configuration
The In-Memory DB Provider will run in one of the following modes. These are set up by the ClowdEnvironment. Depending on the environment you are running you may or may not have access to change this mode. More information on provider configuration is at the bottom of this page.
Generated App Configuration
The In-Memory DB configuration appears in the cdappconfig.json with the following structure.
JSON structure
{
"inMemoryDb": {
"hostname": "hostname",
"port": 27015,
"username": "username",
"password": "password"
}
}
Client access
For supported languages, the In-Memory DB configuration is accessed via the following attribute names.
Language | Attribute Name |
---|---|
Python |
|
Go |
|
Javscript |
|
Ruby |
|
ClowdEnv Configuration
Configuring the In-Memory DB Provider is done by providing the follow JSON
structure to the ClowdEnv
resource. Further details of the options
available can be found in the API reference. A minimal example is shown below
for the operator
mode. Different modes can use different configuration
options, more information can be found in the API reference.
apiVersion: cloud.redhat.com/v1alpha1
kind: ClowdEnvironment
metadata:
name: myenv
spec:
# Other Env Config
providers:
inMemoryDb:
mode: redis
pvc: false