{
    "$schema": "https://json-schema.org/draft/2019-09/schema",
    "$id": "http://corda.net/corda-helm.json",
    "type": "object",
    "default": {},
    "title": "Corda helm chart schema",
    "additionalProperties": false,
    "required": [
        "kafka",
        "databases",
        "stateManager"
    ],
    "properties": {
        "corda-lib": {
            "type": "object",
            "default": {},
            "title": "configuration for library sub-chart",
            "additionalProperties": false,
            "required": [
                "global"
            ],
            "properties": {
                "global": {
                    "type": "object",
                    "default": {},
                    "title": "global configuration",
                    "additionalProperties": false,
                    "properties": {
                    }
                }
            }
        },
        "fullnameOverride": {
            "type": "string",
            "default": "",
            "title": "override chart fullname",
            "examples": [""]
        },
        "nameOverride": {
            "type": "string",
            "default": "",
            "title": "override chart name",
            "examples": [""]
        },
        "topologySpreadConstraints": {
            "type": "array",
            "default": [],
            "title": "topology spread constraints",
            "items": {
                "type": [
                    "string",
                    "object",
                    "array"
                ]
            }
        },
        "affinity": {
            "type": "object",
            "default": {},
            "title": "affinity for pod assignment",
            "additionalProperties": {
                "type": [
                    "object"
                ]
            }
        },
        "commonLabels": {
            "type": "object",
            "default": {},
            "title": "extra labels to add to all deployed objects",
            "additionalProperties": {
                "type": [
                    "string",
                    "null"
                ]
            }
        },
        "commonPodLabels": {
            "type": "object",
            "default": {},
            "title": "extra labels to add to all pods created by deployments",
            "additionalProperties": {
                "type": [
                    "string",
                    "null"
                ]
            }
        },
        "image": {
            "type": "object",
            "default": {},
            "title": "worker and CLI image defaults",
            "required": [
                "registry"
            ],
            "properties": {
                "registry": {
                    "type": "string",
                    "default": "corda-os-docker.software.r3.com",
                    "title": "worker image registry",
                    "examples": [
                        "corda-os-docker.software.r3.com"
                    ],
                    "minLength": 1
                },
                "tag": {
                    "type": "string",
                    "default": "",
                    "title": "worker image tag, defaults to Chart appVersion",
                    "examples": [
                        ""
                    ]
                }
            }
        },
        "imagePullSecrets": {
            "type": "array",
            "default": [],
            "title": "image pull secrets",
            "items": {
                "type":"string"
            },
            "examples": [
                []
            ]
        },
        "imagePullPolicy": {
            "type": "string",
            "default": "Always",
            "title": "image pull policy",
            "enum": ["Always", "Never", "IfNotPresent"],
            "examples": [
                "Always"
            ]
        },
        "containerSecurityContext": {
            "type": "object",
            "default": {},
            "title": "define privilege and access control settings for a pod",
            "properties": {
                "runAsUser": {
                    "type": "integer",
                    "title": "specify what user ID that processes will run with",
                    "examples": [
                        "10001"
                    ]
                },
                "runAsNonRoot": {
                    "type": "boolean",
                    "description": "indicates that the container must run as a non-root user",
                    "examples": [
                        true
                    ]
                },
                "runAsGroup": {
                    "type": "integer",
                    "title": "specify what group ID that processes will run with",
                    "examples": [
                        "10002"
                    ]
                },
                "allowPrivilegeEscalation": {
                    "type": "boolean",
                    "title": "enable scraping of worker metrics through Prometheus annotations",
                    "examples": [
                        true
                    ]
                },
                "readOnlyRootFilesystem": {
                    "type": "boolean",
                    "title": "mount the container's root filesystem as read-only",
                    "examples": [
                        true
                    ]
                },
                "procMount": {
                    "type": "string",
                    "description": "denotes the type of proc mount to use for the containers - cannot be set when spec.os.name is windows",
                    "examples": [
                        "DefaultProcMount"
                    ]
                },
                "privileged": {
                    "type": "boolean",
                    "title": "run container in privileged mode",
                    "examples": [
                        true
                    ]
                },
                "capabilities": {
                    "type": "object",
                    "default": {},
                    "title": "linux capabilities for users",
                    "properties": {
                        "add": {
                            "items": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            },
                            "type": [
                                "array",
                                "null"
                            ],
                            "description": "added capabilities"
                        },
                        "drop": {
                            "items": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            },
                            "type": [
                                "array",
                                "null"
                            ],
                            "description": "removed capabilities"
                        }
                    }
                },
                "seccompProfile": {
                    "type": "object",
                    "description": "the seccomp options to use by the containers in this pod - this field cannot be set if spec.os.name is windows",
                    "properties": {
                        "type": {
                            "description": "type indicates which kind of seccomp profile will be applied",
                            "type": "string"
                        },
                        "localhostProfile": {
                            "description": "localhostProfile indicates a profile defined in a file on the node should be used",
                            "type": "string"
                        }
                    }
                },
                "seLinuxOptions": {
                    "type": "object",
                    "description": "SELinuxOptions are the labels to be applied to the container",
                    "properties": {
                        "level": {
                            "description": "Level is SELinux level label that applies to the container.",
                            "type": "string"
                        },
                        "role": {
                            "description": "Role is a SELinux role label that applies to the container.",
                            "type": "string"
                        },
                        "type": {
                            "description": "Type is a SELinux type label that applies to the container.",
                            "type": "string"
                        },
                        "user": {
                            "description": "User is a SELinux user label that applies to the container.",
                            "type": "string"
                        }
                    }
                },
                "windowsOptions": {
                    "type": "object",
                    "description": "the Windows specific settings applied to all containers",
                    "properties": {
                        "gmsaCredentialSpec": {
                            "description": "this is where the GMSA admission webhook inlines the contents of the GMSA credential spec named by the GMSACredentialSpecName field",
                            "type": "string"
                        },
                        "gmsaCredentialSpecName": {
                            "description": "the name of the GMSA credential spec to use",
                            "type": "string"
                        },
                        "hostProcess": {
                            "description": "determines if a container should be run as a 'Host Process' container",
                            "type": "string"
                        },
                        "runAsUserName": {
                            "description": "the UserName in Windows to run the entrypoint of the container process",
                            "type": "string"
                        }
                    }
                }
            }
        },
        "podSecurityContext": {
            "type": "object",
            "default": {},
            "title": "define privilege and access control settings for a pod",
            "properties": {
                "runAsNonRoot": {
                    "type": "boolean",
                    "description": "indicates that the container must run as a non-root user",
                    "examples": [
                        true
                    ]
                },
                "fsGroup": {
                    "type": "integer",
                    "description": "a special supplemental group that applies to all containers in a pod",
                    "format": "int64",
                    "examples": [
                        "1000"
                    ]
                },
                "fsGroupChangePolicy": {
                    "type": "string",
                    "description": "defines behavior of changing ownership and permission of the volume before being exposed inside Pod",
                    "enum": ["Always", "OnRootMismatch"]
                },
                "seccompProfile": {
                    "type": "object",
                    "description": "the seccomp options to use by the containers in this pod - this field cannot be set if spec.os.name is windows",
                    "properties": {
                        "type": {
                            "description": "type indicates which kind of seccomp profile will be applied",
                            "type": "string"
                        },
                        "localhostProfile": {
                            "description": "localhostProfile indicates a profile defined in a file on the node should be used",
                            "type": "string"
                        }
                    }
                },
                "seLinuxOptions": {
                    "type": "object",
                    "description": "SELinuxOptions are the labels to be applied to the container",
                    "properties": {
                        "level": {
                            "description": "Level is SELinux level label that applies to the container.",
                            "type": "string"
                        },
                        "role": {
                            "description": "Role is a SELinux role label that applies to the container.",
                            "type": "string"
                        },
                        "type": {
                            "description": "Type is a SELinux type label that applies to the container.",
                            "type": "string"
                        },
                        "user": {
                            "description": "User is a SELinux user label that applies to the container.",
                            "type": "string"
                        }
                    }
                },
                "sysctls": {
                    "items": {
                        "description": "Sysctl defines a kernel parameter to be set",
                        "properties": {
                            "name": {
                                "description": "Name of a property to set",
                                "type": "string"
                            },
                            "value": {
                                "description": "Value of a property to set",
                                "type": "string"
                            }
                        },
                        "required": [
                            "name",
                            "value"
                        ],
                        "type": "object"
                    },
                    "description": "sysctls holds a list of namespaced sysctls used for the pod",
                    "type": [
                        "array",
                        "null"
                    ]
                },
                "windowsOptions": {
                    "type": "object",
                    "description": "the Windows specific settings applied to all containers",
                    "properties": {
                        "gmsaCredentialSpec": {
                            "description": "this is where the GMSA admission webhook inlines the contents of the GMSA credential spec named by the GMSACredentialSpecName field",
                            "type": "string"
                        },
                        "gmsaCredentialSpecName": {
                            "description": "the name of the GMSA credential spec to use",
                            "type": "string"
                        },
                        "hostProcess": {
                            "description": "determines if a container should be run as a 'Host Process' container",
                            "type": "string"
                        },
                        "runAsUserName": {
                            "description": "the UserName in Windows to run the entrypoint of the container process",
                            "type": "string"
                        }
                    }
                },
                "supplementalGroups": {
                    "items": {
                        "type": "integer",
                        "format": "int64"
                    },
                    "type": [
                        "array",
                        "null"
                    ],
                    "description": "a list of groups applied to the first process run in each container, in addition to the container's primary GID"
                },
                "runAsUser": {
                    "type": "integer",
                    "description": "The UID to run the entrypoint of the container process",
                    "format": "int64",
                    "examples": [
                        "10001"
                    ]
                },
                "runAsGroup": {
                    "type": "integer",
                    "description": "The GID to run the entrypoint of the container process",
                    "format": "int64",
                    "examples": [
                        "10002"
                    ]
                }
            }
        },
        "resources": {
            "type": "object",
            "default": {},
            "title": "default resource limits and requests configuration for the Corda containers",
            "required": [
                "limits",
                "requests"
            ],
            "additionalProperties": false,
            "properties": {
                "limits": {
                    "type": "object",
                    "default": {},
                    "title": "the default CPU/memory resource limits for the Corda containers",
                    "required": [],
                    "properties": {
                        "cpu": {"type": "string"},
                        "memory": {"type": "string"}
                    },
                    "additionalProperties": false,
                    "examples": [{
                        "cpu": "1",
                        "memory": "2048Mi"
                    }]
                },
                "requests": {
                    "type": "object",
                    "default": {},
                    "title": "the default CPU/memory resource request for the Corda containers",
                    "required": [],
                    "properties": {
                        "cpu": {"type": "string"},
                        "memory": {"type": "string"}
                    },
                    "additionalProperties": false,
                    "examples": [{
                        "cpu": "1",
                        "memory": "2048Mi"
                    }]
                }
            }
        },
        "logging": {
            "type": "object",
            "default": {},
            "title": "Logging configuration",
            "additionalProperties": false,
            "required": [
                "format",
                "level"
            ],
            "properties": {
                "format": {
                    "type": "string",
                    "default": "json",
                    "title": "log format",
                    "examples": [
                        "json"
                    ],
                    "enum": ["json","text"]

                },
                "level": {
                    "type": "string",
                    "default": "warn",
                    "title": "log level",
                    "examples": [
                        "warn"
                    ],
                    "enum": ["all","trace","debug","info","warn","error","fatal","off"]
                }
            },
            "examples": [{
                "format": "json",
                "level": "warn"
            }]
        },
        "metrics": {
            "type": "object",
            "title": "Metrics configuration",
            "additionalProperties": false,
            "required": [
                "scrape",
                "podMonitor"
            ],
            "properties": {
                "scrape": {
                    "type": "boolean",
                    "default": true,
                    "title": "enable scraping of worker metrics through Prometheus annotations",
                    "examples": [
                        true
                    ]
                },
                "keepNames": {
                    "type": "array",
                    "items": {
                        "type": "string",
                        "format": "regex"
                    },
                    "title": "A list of regular expressions for the names of metrics that Corda should keep; if empty, all metrics are kept",
                    "examples": [[ "jvm_.*" ]]
                },
                "dropLabels": {
                    "type": "array",
                    "items": {
                        "type": "string",
                        "format": "regex"
                    },
                    "title": "A list of regular expressions for labels that Corda should drop across all metrics; if empty, all labels are kept",
                    "examples": [[ "virtualnode_destination" ]]
                },
                "podMonitor": {
                    "type": "object",
                    "default": {},
                    "title": "Pod monitor configuration",
                    "additionalProperties": false,
                    "required": [
                        "enabled"
                    ],
                    "properties": {
                        "enabled": {
                            "type": "boolean",
                            "default": false,
                            "title": "Enable pod monitor creation to identify endpoints to scrape",
                            "examples": [
                                false
                            ]
                        },
                        "labels": {
                            "type": "object",
                            "default": {},
                            "title": "Labels that can be used so PodMonitor is discovered by Prometheus",
                            "additionalProperties": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            },
                            "examples": [{}]
                        }
                    },
                    "examples": [
                        {
                            "enabled": false
                        }
                    ]
                }
            },
            "examples": [
                {
                    "scrape": false
                }
            ]
        },
        "tracing": {
            "type": "object",
            "title": "Distributed tracing configuration",
            "additionalProperties": false,
            "required": [
                "endpoint"
            ],
            "properties": {
                "endpoint": {
                    "type": "string",
                    "default": "",
                    "title": "URL for endpoint to send Zipkin-format distributed traces to",
                    "examples": [
                        "http://tempo:9411"
                    ]
                },
                "samplesPerSecond": {
                    "type": "string",
                    "default": "1",
                    "title": "Number of request traces to sample per second, defaults to 1 sample per second. Set to 'unlimited' to record all traces, but in this case amount of tracing data produced can be quite vast.",
                    "examples": [
                        "10",
                        "unlimited"
                    ]
                }
            },
            "examples": [
                {
                    "endpoint": "http://tempo:9411",
                    "samplesPerSecond": "10"
                },
                {
                    "endpoint": "http://tempo:9411",
                    "samplesPerSecond": "unlimited"
                }
            ]
        },
        "dumpHostPath": {
            "type": "string",
            "default": "",
            "title": "path on Kubernetes hosts to mount on Corda workers for collecting dumps",
            "examples": [
                "/logging"
            ]
        },
        "heapDumpOnOutOfMemoryError": {
            "type": "boolean",
            "default": false,
            "title": "enables capturing JVM heap dumps from Corda workers on an OutOfMemory error",
            "examples": [
                false,
                true
            ]
        },
        "nodeSelector": {
            "type": "object",
            "default": {},
            "title": "node labels for pod assignment, see https://kubernetes.io/docs/user-guide/node-selection/",
            "required": [],
            "properties": {},
            "examples": [{}]
        },
        "serviceAccount": {
            "type": "object",
            "default": {},
            "title": "service account for pod assignment, see https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/",
            "additionalProperties": false,
            "required": [
                "name"
            ],
            "properties": {
                "name": {
                    "type": "string",
                    "default": "",
                    "title": "name of the service account",
                    "examples": [""]
                }
            },
            "examples": [{}]
        },
        "annotations": {
            "type": "object",
            "default": {},
            "title": "custom annotations for all workers",
            "required": [],
            "properties": {},
            "examples": [{}]
        },
        "tolerations": {
            "type": "array",
            "default": [],
            "title": "custom tolerations for all workers and bootstrap jobs",
            "required": [
                "key",
                "effect"
            ],
            "additionalProperties": false,
            "properties": {
                "key": {
                    "type": "string",
                    "default": "",
                    "title": "toleration key",
                    "examples": [
                        "corda"
                    ]
                },
                "operator": {
                    "type": "string",
                    "default": "Equal",
                    "title": "toleration operator",
                    "examples": [
                        "Equal"
                    ]
                },
                "value": {
                    "type": "string",
                    "default": "",
                    "title": "toleration value",
                    "examples": [
                        "testing"
                    ]
                },
                "effect": {
                    "type": "string",
                    "default": "",
                    "title": "toleration effect",
                    "examples": [
                        "NoSchedule"
                    ]
                }
            },
            "examples": [{
                "key": "corda",
                "operator": "Equal",
                "value": "testing",
                "effect": "NoSchedule"
            }]
        },
        "kafka": {
            "type": "object",
            "default": {},
            "title": "Kafka configuration",
            "required": [
                "bootstrapServers",
                "topicPrefix",
                "tls",
                "sasl"
            ],
            "additionalProperties": false,
            "properties": {
                "bootstrapServers": {
                    "type": "string",
                    "default": "",
                    "title": "comma-separated list of Kafka bootstrap servers",
                    "examples": [
                        "prereqs-kafka:9092"
                    ],
                    "minLength": 1
                },
                "topicPrefix": {
                    "type": "string",
                    "default": "",
                    "title": "prefix to use for Kafka topic names (to support the use of a single Kafka cluster by multiple Corda clusters)",
                    "examples": [
                        ""
                    ]
                },
                "tls": {
                    "type": "object",
                    "default": {},
                    "title": "tls configuration for client connections to Kafka",
                    "required": [
                        "enabled"
                    ],
                    "additionalProperties": false,
                    "properties": {
                        "enabled": {
                            "type": "boolean",
                            "default": false,
                            "title": "indicates whether TLS should be used for client connections to Kafka",
                            "examples": [
                                false,
                                true
                            ]
                        },
                        "truststore": {
                            "type": "object",
                            "default": {},
                            "title": "if TLS is enabled, the truststore configuration for client connections to Kafka",
                            "required": [
                                "valueFrom",
                                "type"
                            ],
                            "additionalProperties": false,
                            "properties": {
                                "valueFrom": {
                                    "type": "object",
                                    "default": {},
                                    "title": "The truststore secret configuration",
                                    "required": [
                                        "secretKeyRef"
                                    ],
                                    "additionalProperties": false,
                                    "properties": {
                                        "secretKeyRef": {
                                            "type": "object",
                                            "default": {},
                                            "title": "The truststore key reference",
                                            "required": [
                                                "name",
                                                "key"
                                            ],
                                            "properties": {
                                                "name": {
                                                    "type": "string",
                                                    "default": "",
                                                    "title": "The truststore secret name"
                                                },
                                                "key": {
                                                    "type": "string",
                                                    "default": "",
                                                    "title": "The truststore secret key"
                                                }
                                            }
                                        }
                                    }
                                },
                                "type": {
                                    "type": "string",
                                    "default": "PEM",
                                    "title": "if TLS is enabled, the type of the truststore for client connections to Kafka; one of PEM or JKS",
                                    "examples": [
                                        "PEM"
                                    ],
                                    "enum": ["PEM","JKS"]
                                },
                                "password": {
                                    "$ref": "#/$defs/config"
                                }
                            }
                        }
                    }
                },
                "sasl": {
                    "type": "object",
                    "default": {},
                    "title": "SASL configuration for client connection to Kafka",
                    "required": [
                        "enabled"
                    ],
                    "additionalProperties": false,
                    "properties": {
                        "enabled": {
                            "type": "boolean",
                            "default": false,
                            "title": "enable/disable SASL for client connection to Kafka",
                            "examples": [
                                false,
                                true
                            ]
                        },
                        "username": {
                            "$ref": "#/$defs/config"
                        },
                        "password": {
                            "$ref": "#/$defs/config"
                        },
                        "mechanism": {
                            "type": "string",
                            "default": "",
                            "title": "SASL mechanism for client connection to Kafka",
                            "examples": [
                                "SCRAM-SHA-256"
                            ],
                            "minLength": 1
                        }
                    },
                    "examples": [{
                        "username": {
                            "value": "user"
                        },
                        "password": {
                            "value": "password"
                        },
                        "mechanism": "SCRAM-SHA-256",
                        "enabled": true
                    }]
                }
            }
        },
        "stateManager": {
            "type": "object",
            "default": {},
            "title": "Persistent Storage configuration for each State Type managed by the State Manager within the Platform",
            "required": [
                "flowCheckpoint",
                "flowMapping",
                "flowStatus",
                "keyRotation",
                "p2pSession",
                "tokenPoolCache"
            ],
            "additionalProperties": false,
            "properties": {
                "flowCheckpoint": {
                    "type": "object",
                    "$ref": "#/$defs/persistentStorageMapping",
                    "title": "Persistent Storage configuration to be used by the State Manager when dealing with 'flowCheckpoint' states"
                },
                "flowMapping": {
                    "type": "object",
                    "$ref": "#/$defs/persistentStorageMapping",
                    "title": "Persistent Storage configuration to be used by the State Manager when dealing with 'flowMapping' states"
                },
                "flowStatus": {
                    "type": "object",
                    "$ref": "#/$defs/persistentStorageMapping",
                    "title": "Persistent Storage configuration to be used by the State Manager when dealing with 'flowStatus' states"
                },
                "keyRotation": {
                    "type": "object",
                    "$ref": "#/$defs/persistentStorageMapping",
                    "title": "Persistent Storage configuration to be used by the State Manager when dealing with 'keyRotation' states"
                },
                "p2pSession": {
                    "type": "object",
                    "$ref": "#/$defs/persistentStorageMapping",
                    "title": "Persistent Storage configuration to be used by the State Manager when dealing with 'peerToPeerSession' states"
                },
                "tokenPoolCache": {
                    "type": "object",
                    "$ref": "#/$defs/persistentStorageMapping",
                    "title": "Persistent Storage configuration to be used by the State Manager when dealing with 'tokenPoolCache' states"
                }
            }
        },
        "databases": {
            "type": "array",
            "minItems": 1,
            "title": "List of databases used by the platform",
            "items": {
                "type": "object",
                "allOf": [
                    {
                        "$ref": "#/$defs/databaseTemplate"
                    }
                ],
                "required": [
                    "name",
                    "host",
                    "port",
                    "type"
                ]
            },
            "$comment": "At least one 'default' database must be defined",
            "contains": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "string",
                        "const": "default"
                    }
                }
            }
        },
        "bootstrap": {
            "type": "object",
            "default": {},
            "title": "configuration for cluster bootstrap",
            "required": [
                "preinstallCheck",
                "restApiAdmin",
                "db",
                "kafka",
                "image",
                "resources",
                "nodeSelector",
                "commonPodLabels"
            ],
            "additionalProperties": false,
            "properties": {
                "preinstallCheck": {
                    "type": "object",
                    "default": {},
                    "title": "configuration for the preinstall check",
                    "required": [
                        "enabled",
                        "serviceAccount"
                    ],
                    "additionalProperties": false,
                    "properties": {
                        "enabled": {
                            "type": "boolean",
                            "default": true,
                            "title": "indicates whether the preinstall check is enabled",
                            "examples": [
                                true,
                                false
                            ]
                        },
                        "serviceAccount": {
                            "type": "object",
                            "default": {},
                            "title": "configuration for a service account for the preinstall check",
                            "required": [
                                "create",
                                "name"
                            ],
                            "additionalProperties": false,
                            "properties": {
                                "create": {
                                    "type": "boolean",
                                    "default": true,
                                    "title": "indicates whether the service account should be created",
                                    "examples": [
                                        true,
                                        false
                                    ]
                                },
                                "name": {
                                    "type": "string",
                                    "default": "",
                                    "title": "name of the service account, if not set and create is true, a name is generated from a template",
                                    "examples": [""]
                                }
                            }
                        }
                    }
                },
                "restApiAdmin": {
                    "type": "object",
                    "default": {},
                    "title": "configuration for the initial REST API user created with admin permissions",
                    "required": [
                        "username"
                    ],
                    "additionalProperties": false,
                    "properties": {
                        "username": {
                            "$ref": "#/$defs/config"
                        },
                        "password": {
                            "$ref": "#/$defs/config"
                        }
                    }
                },
                "db": {
                    "type": "object",
                    "default": {},
                    "title": "configuration for database bootstrap",
                    "required": [
                        "enabled"
                    ],
                    "additionalProperties": false,
                    "properties": {
                        "enabled": {
                            "type": "boolean",
                            "default": true,
                            "title": "indicates whether DB bootstrap is enabled as part of installation",
                            "examples": [
                                true,
                                false
                            ]
                        },
                        "clientImage": {
                            "type": "object",
                            "default": {},
                            "title": "db client image",
                            "required": [
                                "registry",
                                "repository",
                                "tag"
                            ],
                            "additionalProperties": false,
                            "properties": {
                                "registry": {
                                    "type": "string",
                                    "default": "",
                                    "title": "registry for image containing a db client, used to set up the db",
                                    "examples": [
                                        "docker.io"
                                    ]
                                },
                                "repository": {
                                    "type": "string",
                                    "default": "postgres",
                                    "title": "repository for image containing a db client, used to set up the db",
                                    "examples": [
                                        "postgres"
                                    ],
                                    "minLength": 1
                                },
                                "tag": {
                                    "type": "string",
                                    "default": "14.4",
                                    "title": "tag for image containing a db client, used to set up the db",
                                    "examples": [
                                        "14.4"
                                    ],
                                    "minLength": 1
                                }
                            },
                            "examples": [{
                                "registry": "docker.io",
                                "repository": "postgres",
                                "tag": "14.4"
                            }]
                        },
                        "crypto": {
                            "allOf": [
                                {
                                    "$ref": "#/$defs/persistentStorageMapping"
                                },
                                {
                                    "$ref": "#/$defs/persistentStorageRuntimeConnectionSettings"
                                }
                            ]
                        },
                        "rbac": {
                            "allOf": [
                                {
                                    "$ref": "#/$defs/persistentStorageMapping"
                                },
                                {
                                    "$ref": "#/$defs/persistentStorageRuntimeConnectionSettings"
                                }
                            ]
                        },
                        "virtualNodes": {
                            "allOf": [
                                {
                                    "$ref": "#/$defs/persistentStorageMapping"
                                },
                                {
                                    "$ref": "#/$defs/persistentStorageRuntimeConnectionSettings"
                                }
                            ]
                        },
                        "databases": {
                            "type": "array",
                            "title": "Administrator credentials per database, used to configure users/roles and grant required runtime permissions",
                            "items": {
                                "type": "object",
                                "default": {},
                                "title": "Connection settings for databases used by the Platform",
                                "additionalProperties": false,
                                "required": [
                                    "id",
                                    "username",
                                    "password"
                                ],
                                "properties": {
                                    "id": {
                                        "type": "string",
                                        "minLength": 1
                                    },
                                    "username": {
                                        "$ref": "#/$defs/config"
                                    },
                                    "password": {
                                        "$ref": "#/$defs/config"
                                    }
                                }
                            }
                        }
                    }
                },
                "kafka": {
                    "type": "object",
                    "default": {},
                    "title": "configuration for Kafka bootstrap",
                    "required": [
                        "enabled"
                    ],
                    "additionalProperties": false,
                    "properties": {
                        "enabled": {
                            "type": "boolean",
                            "default": true,
                            "title": "indicates whether Kafka bootstrap is enabled as part of installation",
                            "examples": [
                                true,
                                false
                            ]
                        },
                        "partitions": {
                            "type": "integer",
                            "default": 10,
                            "title": "kafka topic partitions",
                            "examples": [
                                10
                            ]
                        },
                        "replicas": {
                            "type": "integer",
                            "default": 3,
                            "title": "kafka topic replicas",
                            "examples": [
                                3
                            ]
                        },
                        "overrides": {
                            "type": "object",
                            "default": null,
                            "title": "overrides for Kafka topic configuration",
                            "examples": [
                                {
                                    "topics": [{
                                        "name": "avro.schema",
                                        "partitions": 5
                                    }]
                                }
                            ]
                        },
                        "timeoutSeconds": {
                            "type": "integer",
                            "default": 60,
                            "minimum": 60,
                            "title": "Maximum time, in seconds, to wait for Kafka topic creation operation to finish (might vary depending on the amount of partitions and replicas configured)"
                        },
                        "sasl": {
                            "type": "object",
                            "title": "kafka SASL credentials",
                            "properties": {
                                "username": {
                                    "$ref": "#/$defs/config"
                                },
                                "password": {
                                    "$ref": "#/$defs/config"
                                }
                            },
                            "additionalProperties": false
                        }
                    },
                    "if": {
                        "properties": {
                            "enabled": {
                                "const": true
                            }
                        }
                    },
                    "then": {
                        "required": [
                            "partitions",
                            "replicas"
                        ]
                    },
                    "examples": [{
                        "enabled": true,
                        "partitions": 10,
                        "replicas": 3
                    }]
                },
                "image": {
                    "type": "object",
                    "default": {},
                    "title": "configuration for CLI image used for bootstrap",
                    "required": [
                        "repository"
                    ],
                    "additionalProperties": false,
                    "properties": {
                        "registry": {
                            "type": "string",
                            "default": "",
                            "title": "CLI image registry; defaults to image.registry",
                            "examples": [
                                ""
                            ]
                        },
                        "repository": {
                            "type": "string",
                            "default": "corda-os-plugins",
                            "title": "CLI image repository",
                            "examples": [
                                "corda-os-plugins"
                            ],
                            "minLength": 1
                        },
                        "tag": {
                            "type": "string",
                            "default": "",
                            "title": "CLI default tag; defaults to image.tag",
                            "examples": [
                                ""
                            ]
                        }
                    },
                    "examples": [{
                        "registry": "",
                        "repository": "corda-os-plugins",
                        "tag": ""
                    }]
                },
                "resources": {
                    "type": "object",
                    "default": {},
                    "title": "resource limits and requests configuration for the bootstrap containers",
                    "required": [
                        "requests",
                        "limits"
                    ],
                    "additionalProperties": false,
                    "properties": {
                        "requests": {
                            "type": "object",
                            "default": {},
                            "title": "the CPU/memory resource requests for the bootstrap containers",
                            "required": [],
                            "properties": {
                                "cpu": {"type": "string"},
                                "memory": {"type": "string"}
                            },
                            "additionalProperties": false,
                            "examples": [{
                                "cpu": "1",
                                "memory": "2048Mi"
                            }]
                        },
                        "limits": {
                            "type": "object",
                            "default": {},
                            "title": "the CPU/memory resource limits for the bootstrap containers",
                            "required": [],
                            "properties": {
                                "cpu": {"type": "string"},
                                "memory": {"type": "string"}
                            },
                            "additionalProperties": false,
                            "examples": [{
                                "cpu": "1",
                                "memory": "2048Mi"
                            }]
                        }
                    },
                    "examples": [{
                        "requests": {
                            "cpu": "1",
                            "memory": "2048Mi"
                        },
                        "limits": {
                            "cpu": "1",
                            "memory": "2048Mi"
                        }
                    }]
                },
                "nodeSelector": {
                    "type": "object",
                    "default": {},
                    "title": "node selector for the bootstrap containers",
                    "required": [],
                    "properties": {},
                    "examples": [{}]
                },
                "serviceAccount": {
                    "type": "object",
                    "default": "",
                    "title": "service account for the bootstrap containers",
                    "additionalProperties": false,
                    "required": [
                        "name"
                    ],
                    "properties": {
                        "name": {
                            "type": "string",
                            "default": "",
                            "title": "name of the service account",
                            "examples": [""]
                        }
                    },
                    "examples": [{}]
                },
                "rbac": {
                    "type": "object",
                    "default": {},
                    "title": "RBAC roles bootstrap configuration",
                    "required": [
                        "enabled"
                    ],
                    "additionalProperties": false,
                    "properties": {
                        "enabled": {
                            "type": "boolean",
                            "default": true,
                            "title": "Enables RBAC roles bootstrapping as part of installation",
                            "examples": [
                                false,
                                true
                            ]
                        }
                    },
                    "examples": [{
                        "enabled": true
                    }]
                },
                "commonPodLabels": {
                    "type": "object",
                    "default": {},
                    "title": "extra labels to add to all pods created by bootstrap jobs",
                    "additionalProperties": {
                        "type": [
                            "string",
                            "null"
                        ]
                    }
                }
            }
        },
        "config": {
            "type": "object",
            "title": "config service configuration",
            "required": [
                "encryption",
                "partition",
                "storageId",
                "type"
            ],
            "allOf": [
                {
                    "$ref": "#/$defs/persistentStorageMapping"
                },
                {
                    "properties": {
                        "encryption": {
                            "type": "object",
                            "title": "configuration for encryption of configuration",
                            "required": [
                                "salt",
                                "passphrase"
                            ],
                            "additionalProperties": false,
                            "properties": {
                                "salt": {
                                    "$ref": "#/$defs/config"
                                },
                                "passphrase": {
                                    "$ref": "#/$defs/config"
                                }
                            }
                        }
                    }
                }
            ]
        },
        "workers": {
            "type": "object",
            "default": {},
            "title": "worker configuration",
            "required": [
                "crypto",
                "db",
                "flow",
                "flowMapper",
                "verification",
                "membership",
                "rest",
                "p2pLinkManager",
                "p2pGateway",
                "persistence",
                "uniqueness"
            ],
            "additionalProperties": false,
            "properties": {
                "crypto": {
                    "allOf": [
                        {
                            "$ref": "#/$defs/worker"
                        },
                        {
                            "additionalProperties": false,
                            "required": [
                                "stateManager",
                                "config"
                            ],
                            "properties": {
                                "image": {},
                                "javaOptions": {},
                                "annotations": {},
                                "replicaCount": {},
                                "debug": {},
                                "logging": {},
                                "profiling": {},
                                "resources": {},
                                "kafka": {},
                                "extraArgs": {},
                                "config": {
                                    "$ref": "#/$defs/persistentStorageRuntimeConnectionSettings"
                                },
                                "stateManager": {
                                    "type": "object",
                                    "required": [
                                        "keyRotation"
                                    ],
                                    "additionalProperties": false,
                                    "properties": {
                                        "keyRotation": {
                                            "type": "object",
                                            "$ref": "#/$defs/persistentStorageRuntimeConnectionSettings"
                                        }
                                    }
                                }
                            }
                        }
                    ]
                },
                "db": {
                    "allOf": [
                        {
                            "$ref": "#/$defs/worker"
                        },
                        {
                            "additionalProperties": false,
                            "properties": {
                                "image": {},
                                "javaOptions": {},
                                "annotations": {},
                                "replicaCount": {},
                                "debug": {},
                                "logging": {},
                                "profiling": {},
                                "resources": {},
                                "kafka": {},
                                "extraArgs": {},
                                "config": {
                                    "$ref": "#/$defs/persistentStorageRuntimeConnectionSettings"
                                }
                            },
                            "examples": [{
                                "image": {
                                    "registry": "",
                                    "repository": "corda-os-db-worker",
                                    "tag": ""
                                },
                                "replicaCount": 1,
                                "debug": {
                                    "enabled": false,
                                    "suspend": false
                                },
                                "logging": {
                                    "level": "warn"
                                },
                                "profiling": {
                                    "enabled": false
                                },
                                "resources": {
                                    "requests": {
                                        "cpu": "1",
                                        "memory": "2048Mi"
                                    },
                                    "limits": {
                                        "cpu": "1",
                                        "memory": "2048Mi"
                                    }
                                }
                            }]
                        }
                    ]
                },
                "flow": {
                    "allOf": [
                        {
                            "$ref": "#/$defs/worker"
                        },
                        {
                            "required": [
                                "stateManager",
                                "verifyInstrumentation"
                            ],
                            "additionalProperties": false,
                            "properties": {
                                "image": {},
                                "javaOptions": {},
                                "annotations": {},
                                "replicaCount": {},
                                "debug": {},
                                "logging": {},
                                "profiling": {},
                                "resources": {},
                                "kafka": {},
                                "extraArgs": {},
                                "stateManager": {
                                    "type": "object",
                                    "required": [
                                        "flowCheckpoint"
                                    ],
                                    "additionalProperties": false,
                                    "properties": {
                                        "flowCheckpoint": {
                                            "type": "object",
                                            "$ref": "#/$defs/persistentStorageRuntimeConnectionSettings"
                                        }
                                    }
                                },
                                "verifyInstrumentation": {
                                    "type": "boolean",
                                    "default": false,
                                    "title": "run flow worker with Quasar's verifyInstrumentation enabled",
                                    "examples": [
                                        false
                                    ]
                                }
                            },
                            "examples": [{
                                "image": {
                                    "registry": "corda-os-docker.software.r3.com",
                                    "repository": "corda-os-flow-worker",
                                    "tag": ""
                                },
                                "replicaCount": 1,
                                "debug": {
                                    "enabled": false,
                                    "suspend": false
                                },
                                "logging": {
                                    "level": "warn"
                                },
                                "profiling": {
                                    "enabled": false
                                },
                                "resources": {
                                    "requests": {
                                        "cpu": "1",
                                        "memory": "2048Mi"
                                    },
                                    "limits": {
                                        "cpu": "1",
                                        "memory": "2048Mi"
                                    }
                                },
                                "verifyInstrumentation": false
                            }]
                        }
                    ]
                },
                "flowMapper": {
                    "allOf": [
                        {
                            "$ref": "#/$defs/worker"
                        },
                        {
                            "required": [
                                "stateManager",
                                "verifyInstrumentation"
                            ],
                            "additionalProperties": false,
                            "properties": {
                                "image": {},
                                "javaOptions": {},
                                "annotations": {},
                                "replicaCount": {},
                                "debug": {},
                                "logging": {},
                                "profiling": {},
                                "resources": {},
                                "kafka": {},
                                "extraArgs": {},
                                "stateManager": {
                                    "type": "object",
                                    "required": [
                                        "flowMapping"
                                    ],
                                    "additionalProperties": false,
                                    "properties": {
                                        "flowMapping": {
                                            "type": "object",
                                            "$ref": "#/$defs/persistentStorageRuntimeConnectionSettings"
                                        }
                                    }
                                },
                                "verifyInstrumentation": {
                                    "type": "boolean",
                                    "default": false,
                                    "title": "run flow mapper worker with Quasar's verifyInstrumentation enabled",
                                    "examples": [
                                        false
                                    ]
                                }
                            },
                            "examples": [{
                                "image": {
                                    "registry": "corda-os-docker.software.r3.com",
                                    "repository": "corda-os-flow-mapper-worker",
                                    "tag": ""
                                },
                                "replicaCount": 1,
                                "debug": {
                                    "enabled": false,
                                    "suspend": false
                                },
                                "logging": {
                                    "level": "warn"
                                },
                                "profiling": {
                                    "enabled": false
                                },
                                "resources": {
                                    "requests": {
                                        "cpu": "1",
                                        "memory": "2048Mi"
                                    },
                                    "limits": {
                                        "cpu": "1",
                                        "memory": "2048Mi"
                                    }
                                },
                                "verifyInstrumentation": false
                            }]
                        }
                    ]
                },
                "verification": {
                    "allOf": [
                        {
                            "$ref": "#/$defs/worker"
                        },
                        {
                            "required": [
                                "verifyInstrumentation"
                            ],
                            "additionalProperties": false,
                            "properties": {
                                "image": {},
                                "javaOptions": {},
                                "annotations": {},
                                "replicaCount": {},
                                "debug": {},
                                "logging": {},
                                "profiling": {},
                                "resources": {},
                                "kafka": {},
                                "extraArgs": {},
                                "verifyInstrumentation": {
                                    "type": "boolean",
                                    "default": false,
                                    "title": "run verification worker with Quasar's verifyInstrumentation enabled",
                                    "examples": [
                                        false
                                    ]
                                }
                            },
                            "examples": [{
                                "image": {
                                    "registry": "corda-os-docker.software.r3.com",
                                    "repository": "corda-os-verification-worker",
                                    "tag": ""
                                },
                                "replicaCount": 1,
                                "debug": {
                                    "enabled": false,
                                    "suspend": false
                                },
                                "logging": {
                                    "level": "warn"
                                },
                                "profiling": {
                                    "enabled": false
                                },
                                "resources": {
                                    "requests": {
                                        "cpu": "1",
                                        "memory": "2048Mi"
                                    },
                                    "limits": {
                                        "cpu": "1",
                                        "memory": "2048Mi"
                                    }
                                },
                                "verifyInstrumentation": false
                            }]
                        }
                    ]
                },
                "membership": {
                    "allOf": [
                        {
                            "$ref": "#/$defs/worker"
                        },
                        {
                            "additionalProperties": false,
                            "properties": {
                                "image": {},
                                "javaOptions": {},
                                "annotations": {},
                                "replicaCount": {},
                                "debug": {},
                                "logging": {},
                                "profiling": {},
                                "resources": {},
                                "kafka": {},
                                "extraArgs": {}
                            }
                        }
                    ]
                },
                "rest": {
                    "allOf": [
                        {
                            "$ref": "#/$defs/worker"
                        },
                        {
                            "required": [
                                "service",
                                "stateManager"
                            ],
                            "additionalProperties": false,
                            "properties": {
                                "image": {},
                                "javaOptions": {},
                                "annotations": {},
                                "replicaCount": {},
                                "debug": {},
                                "logging": {},
                                "profiling": {},
                                "resources": {},
                                "kafka": {},
                                "extraArgs": {},
                                "stateManager": {
                                    "type": "object",
                                    "required": [
                                        "flowStatus",
                                        "keyRotation"
                                    ],
                                    "additionalProperties": false,
                                    "properties": {
                                        "keyRotation": {
                                            "type": "object",
                                            "$ref": "#/$defs/persistentStorageRuntimeConnectionSettings"
                                        },
                                        "flowStatus": {
                                            "type": "object",
                                            "$ref": "#/$defs/persistentStorageRuntimeConnectionSettings"
                                        }
                                    }
                                },
                                "service": {
                                    "type": "object",
                                    "default": {},
                                    "title": "REST worker service configuration",
                                    "required": [
                                        "type",
                                        "externalTrafficPolicy",
                                        "loadBalancerSourceRanges",
                                        "annotations"
                                    ],
                                    "additionalProperties": false,
                                    "properties": {
                                        "type": {
                                            "type": "string",
                                            "default": "",
                                            "title": "the type for the REST worker service",
                                            "examples": [
                                                "ClusterIP"
                                            ]
                                        },
                                        "port": {
                                            "type": "integer",
                                            "default": 443,
                                            "title": "the HTTP port for the REST worker service",
                                            "examples": [
                                                443
                                            ]
                                        },
                                        "externalTrafficPolicy": {
                                            "type": "string",
                                            "default": "",
                                            "title": "the traffic policy for the REST worker service",
                                            "examples": [
                                                ""
                                            ]
                                        },
                                        "loadBalancerSourceRanges": {
                                            "type": "array",
                                            "default": [],
                                            "title": "the LoadBalancer source ranges to limit access to the REST worker service",
                                            "items": {},
                                            "examples": [
                                                []
                                            ]
                                        },
                                        "annotations": {
                                            "type": "object",
                                            "default": {},
                                            "title": "the annotations for REST worker service",
                                            "required": [],
                                            "properties": {},
                                            "examples": [
                                                {}
                                            ]
                                        }
                                    },
                                    "examples": [
                                        {
                                            "type": "ClusterIP",
                                            "port": 443,
                                            "externalTrafficPolicy": "",
                                            "loadBalancerSourceRanges": [],
                                            "annotations": {}
                                        }
                                    ]
                                },
                                "ingress": {
                                    "type": "object",
                                    "default": {},
                                    "title": "REST worker ingress configuration",
                                    "required": [
                                        "annotations",
                                        "hosts"
                                    ],
                                    "additionalProperties": false,
                                    "properties": {
                                        "annotations": {
                                            "type": "object",
                                            "default": {},
                                            "title": "the annotations for REST worker ingress",
                                            "required": [],
                                            "properties": {},
                                            "examples": [
                                                {
                                                    "cert-manager.io/cluster-issuer": "production",
                                                    "nginx.ingress.kubernetes.io/backend-protocol": "HTTPS"
                                                }
                                            ]
                                        },
                                        "className": {
                                            "type": "string",
                                            "default": "",
                                            "title": "the className for the REST worker ingress",
                                            "examples": [
                                                "nginx"
                                            ]
                                        },
                                        "hosts": {
                                            "type": "array",
                                            "default": [],
                                            "title": "the hosts for REST worker ingress",
                                            "items": {},
                                            "examples": [
                                                ["rest-worker-1234.dev.corda.cloud"]
                                            ]
                                        }
                                    },
                                    "examples": [
                                        {
                                            "annotations": {
                                                "cert-manager.io/cluster-issuer": "production",
                                                "nginx.ingress.kubernetes.io/backend-protocol": "HTTPS"
                                            },
                                            "className": "nginx",
                                            "hosts": [
                                                "rest-worker-1234.dev.corda.cloud"
                                            ]
                                        }
                                    ]
                                },
                                "tls": {
                                    "type": "object",
                                    "title": "REST Worker TLS configuration",
                                    "additionalProperties": false,
                                    "properties": {
                                        "secretName": {
                                            "type": "string",
                                            "default": "",
                                            "title": "The name of the Kubernetes secret containing the certificate, private key and CA certificate. If not specified, a new secret will be created and certificates/keys generated."
                                        },
                                        "generation": {
                                            "type": "object",
                                            "title": "Optional parameters to be used during TLS certificate generation.",
                                            "additionalProperties": false,
                                            "properties": {
                                                "altNames": {
                                                    "type": "array",
                                                    "title": "Alternative names to be included in a certificate when generated."
                                                }
                                            }
                                        },
                                        "crt": {
                                            "title": "TLS Certificate configuration",
                                            "additionalProperties": false,
                                            "properties": {
                                                "secretKey": {
                                                    "type": "string",
                                                    "default": "",
                                                    "title": "the key in the secret corresponding to the certificate value"
                                                }
                                            }
                                        },
                                        "key": {
                                            "title": "TLS Certificate private key configuration",
                                            "additionalProperties": false,
                                            "properties": {
                                                "secretKey": {
                                                    "type": "string",
                                                    "default": "",
                                                    "title": "the key in the secret corresponding to the private key value"
                                                }
                                            }
                                        },
                                        "ca": {
                                            "title": "Certification Authority(CA) certificates chain configuration",
                                            "additionalProperties": false,
                                            "properties": {
                                                "secretKey": {
                                                    "type": "string",
                                                    "default": "",
                                                    "title": "the key in the secret corresponding to the CA certificate chain value"
                                                }
                                            }
                                        }
                                    }
                                }
                            },
                            "examples": [
                                {
                                    "image": {
                                        "registry": "corda-os-docker.software.r3.com",
                                        "repository": "corda-os-rest-worker",
                                        "tag": ""
                                    },
                                    "replicaCount": 1,
                                    "debug": {
                                        "enabled": false,
                                        "suspend": false
                                    },
                                    "logging": {
                                        "level": "warn"
                                    },
                                    "profiling": {
                                        "enabled": false
                                    },
                                    "resources": {
                                        "requests": {
                                            "cpu": "1",
                                            "memory": "2048Mi"
                                        },
                                        "limits": {
                                            "cpu": "1",
                                            "memory": "2048Mi"
                                        }
                                    },
                                    "service": {
                                        "type": "ClusterIP",
                                        "port": 443,
                                        "externalTrafficPolicy": "",
                                        "loadBalancerSourceRanges": [],
                                        "annotations": {}
                                    },
                                    "ingress": {
                                        "annotations": {
                                            "cert-manager.io/cluster-issuer": "production",
                                            "nginx.ingress.kubernetes.io/backend-protocol": "HTTPS"
                                        },
                                        "className": "nginx",
                                        "hosts": [
                                            "rest-worker-1234.dev.corda.cloud"
                                        ]
                                    }
                                }
                            ]
                        }
                    ]
                },
                "p2pLinkManager": {
                    "allOf": [
                        {
                            "$ref": "#/$defs/worker"
                        },
                        {
                            "required": [
                                "stateManager"
                            ],
                            "additionalProperties": false,
                            "properties": {
                                "image": {},
                                "javaOptions": {},
                                "annotations": {},
                                "replicaCount": {},
                                "debug": {},
                                "logging": {},
                                "profiling": {},
                                "resources": {},
                                "kafka": {},
                                "extraArgs": {},
                                "stateManager": {
                                    "type": "object",
                                    "required": [
                                        "p2pSession"
                                    ],
                                    "additionalProperties": false,
                                    "properties": {
                                        "p2pSession": {
                                            "type": "object",
                                            "$ref": "#/$defs/persistentStorageRuntimeConnectionSettings"
                                        }
                                    }
                                }
                            },
                            "examples": [
                                {
                                    "image": {
                                        "registry": "corda-os-docker.software.r3.com",
                                        "repository": "corda-os-p2p-link-manager-worker",
                                        "tag": ""
                                    },
                                    "replicaCount": 1,
                                    "debug": {
                                        "enabled": false,
                                        "suspend": false
                                    },
                                    "logging": {
                                        "level": "warn"
                                    },
                                    "profiling": {
                                        "enabled": false
                                    },
                                    "resources": {
                                        "requests": {
                                            "cpu": "1",
                                            "memory": "2048Mi"
                                        },
                                        "limits": {
                                            "cpu": "1",
                                            "memory": "2048Mi"
                                        }
                                    }
                                }
                            ]
                        }
                    ]
                },
                "p2pGateway": {
                    "allOf": [
                        {
                            "$ref": "#/$defs/worker"
                        },
                        {
                            "additionalProperties": false,
                            "properties": {
                                "image": {},
                                "javaOptions": {},
                                "annotations": {},
                                "replicaCount": {},
                                "debug": {},
                                "logging": {},
                                "profiling": {},
                                "resources": {},
                                "kafka": {},
                                "extraArgs": {},
                                "service": {
                                    "type": "object",
                                    "default": {},
                                    "title": "p2p-gateway worker worker service configuration",
                                    "required": [
                                        "port"
                                    ],
                                    "additionalProperties": false,
                                    "properties": {
                                        "port": {
                                            "type": "integer",
                                            "default": 8080,
                                            "title": "the Gateway HTTP port",
                                            "examples": [
                                                8080
                                            ]
                                        }
                                    },
                                    "examples": [{
                                        "port": 8080
                                    }]
                                },
                                "ingress": {
                                    "type": "object",
                                    "default": {},
                                    "title": "P2P gateway worker ingress configuration",
                                    "required": [
                                        "annotations",
                                        "hosts"
                                    ],
                                    "additionalProperties": false,
                                    "properties": {
                                        "annotations": {
                                            "type": "object",
                                            "default": {},
                                            "title": "the annotations for P2P gateway worker ingress",
                                            "required": [],
                                            "properties": {},
                                            "examples": [
                                                {
                                                    "cert-manager.io/cluster-issuer": "production",
                                                    "nginx.ingress.kubernetes.io/backend-protocol": "HTTPS"
                                                }
                                            ]
                                        },
                                        "className": {
                                            "type": "string",
                                            "default": "",
                                            "title": "the className for the P2P gateway worker ingress",
                                            "examples": [
                                                "nginx"
                                            ]
                                        },
                                        "hosts": {
                                            "type": "array",
                                            "default": [],
                                            "title": "the hosts for P2P gateway worker ingress",
                                            "items": {},
                                            "examples": [
                                                ["p2p-gateway-worker-1234.dev.corda.cloud"]
                                            ]
                                        }
                                    },
                                    "examples": [
                                        {
                                            "annotations": {
                                                "cert-manager.io/cluster-issuer": "production",
                                                "nginx.ingress.kubernetes.io/backend-protocol": "HTTPS"
                                            },
                                            "className": "nginx",
                                            "hosts": [
                                                "p2p-gateway-worker-1234.dev.corda.cloud"
                                            ]
                                        }
                                    ]
                                }
                            },
                            "examples": [{
                                "image": {
                                    "registry": "corda-os-docker.software.r3.com",
                                    "repository": "corda-os-p2p-gateway-worker",
                                    "tag": ""
                                },
                                "replicaCount": 1,
                                "debug": {
                                    "enabled": false,
                                    "suspend": false
                                },
                                "logging": {
                                    "level": "warn"
                                },
                                "profiling": {
                                    "enabled": false
                                },
                                "resources": {
                                    "requests": {
                                        "cpu": "1",
                                        "memory": "2048Mi"
                                    },
                                    "limits": {
                                        "cpu": "1",
                                        "memory": "2048Mi"
                                    }
                                },
                                "service": {
                                    "port": 8080
                                }
                            }]
                        }
                    ]
                },
                "persistence": {
                    "allOf": [
                        {
                            "$ref": "#/$defs/worker"
                        },
                        {
                            "additionalProperties": false,
                            "required": [
                                "config"
                            ],
                            "properties": {
                                "image": {},
                                "javaOptions": {},
                                "annotations": {},
                                "replicaCount": {},
                                "debug": {},
                                "logging": {},
                                "profiling": {},
                                "resources": {},
                                "kafka": {},
                                "extraArgs": {},
                                "config": {
                                    "$ref": "#/$defs/persistentStorageRuntimeConnectionSettings"
                                }
                            },
                            "examples": [{
                                "image": {
                                    "registry": "",
                                    "repository": "corda-os-persistence-worker",
                                    "tag": ""
                                },
                                "replicaCount": 1,
                                "debug": {
                                    "enabled": false,
                                    "suspend": false
                                },
                                "logging": {
                                    "level": "warn"
                                },
                                "profiling": {
                                    "enabled": false
                                },
                                "resources": {
                                    "requests": {
                                        "cpu": "1",
                                        "memory": "2048Mi"
                                    },
                                    "limits": {
                                        "cpu": "1",
                                        "memory": "2048Mi"
                                    }
                                }
                            }]
                        }
                    ]
                },
                "tokenSelection": {
                    "allOf": [
                        {
                            "$ref": "#/$defs/worker"
                        },
                        {
                            "additionalProperties": false,
                            "required": [
                                "config"
                            ],
                            "properties": {
                                "image": {},
                                "javaOptions": {},
                                "annotations": {},
                                "replicaCount": {},
                                "debug": {},
                                "logging": {},
                                "profiling": {},
                                "resources": {},
                                "stateManager": {
                                    "type": "object",
                                    "required": [
                                        "tokenPoolCache"
                                    ],
                                    "additionalProperties": false,
                                    "properties": {
                                        "tokenPoolCache": {
                                            "type": "object",
                                            "$ref": "#/$defs/persistentStorageRuntimeConnectionSettings"
                                        }
                                    }
                                },
                                "kafka": {},
                                "extraArgs": {},
                                "sharding": {
                                    "type": "object",
                                    "default": {
                                        "enabled":  false,
                                        "image": {
                                            "registry": "registry.k8s.io",
                                            "repository": "ingress-nginx/controller",
                                            "tag": "v1.9.3@sha256:8fd21d59428507671ce0fb47f818b1d859c92d2ad07bb7c947268d433030ba98"
                                        },
                                        "replicaCount": 2
                                    },
                                    "title": "token selection sharding configuration",
                                    "required": [
                                        "enabled",
                                        "image",
                                        "replicaCount"
                                    ],
                                    "additionalProperties": false,
                                    "properties": {
                                        "enabled": {
                                            "type": "boolean",
                                            "default": "false",
                                            "title": "enable sharding of requests"
                                        },
                                        "image": {
                                            "type": "object",
                                            "default": {
                                                "registry": "registry.k8s.io",
                                                "repository": "ingress-nginx/controller",
                                                "tag": "v1.9.3@sha256:8fd21d59428507671ce0fb47f818b1d859c92d2ad07bb7c947268d433030ba98"
                                            },
                                            "title": "sharding image configuration",
                                            "required": [
                                                "registry",
                                                "repository",
                                                "tag"
                                            ],
                                            "additionalProperties": false,
                                            "properties": {
                                                "registry": {
                                                    "type": "string",
                                                    "default": "registry.k8s.io",
                                                    "title": "sharding image registry",
                                                    "examples": [
                                                        "registry.k8s.io"
                                                    ],
                                                    "minLength": 1
                                                },
                                                "repository": {
                                                    "type": "string",
                                                    "title": "sharding image repository",
                                                    "examples": [
                                                        "ingress-nginx/controller"
                                                    ],
                                                    "minLength": 1
                                                },
                                                "tag": {
                                                    "type": "string",
                                                    "default": "v1.9.3@sha256:8fd21d59428507671ce0fb47f818b1d859c92d2ad07bb7c947268d433030ba98",
                                                    "title": "sharding image tag",
                                                    "examples": [
                                                        "v1.9.3@sha256:8fd21d59428507671ce0fb47f818b1d859c92d2ad07bb7c947268d433030ba98"
                                                    ],
                                                    "minLength": 1
                                                }
                                            },
                                            "examples": [{
                                                "registry": "corda-os-docker.software.r3.com",
                                                "repository": "corda-os-xxx-worker",
                                                "tag": ""
                                            }]
                                        },
                                        "replicaCount": {
                                            "type": "integer",
                                            "default": 2,
                                            "title": "sharding replica count",
                                            "examples": [
                                                2
                                            ]
                                        }
                                    }
                                },
                                "config": {
                                    "$ref": "#/$defs/persistentStorageRuntimeConnectionSettings"
                                }
                            },
                            "examples": [{
                                "image": {
                                    "registry": "",
                                    "repository": "corda-os-token-selection-worker",
                                    "tag": ""
                                },
                                "replicaCount": 1,
                                "debug": {
                                    "enabled": false,
                                    "suspend": false
                                },
                                "logging": {
                                    "level": "warn"
                                },
                                "profiling": {
                                    "enabled": false
                                },
                                "resources": {
                                    "requests": {
                                        "cpu": "1",
                                        "memory": "2048Mi"
                                    },
                                    "limits": {
                                        "cpu": "1",
                                        "memory": "2048Mi"
                                    }
                                }
                            }]
                        }
                    ]
                },
                "uniqueness": {
                    "allOf": [
                        {
                            "$ref": "#/$defs/worker"
                        },
                        {
                            "additionalProperties": false,
                            "required": [
                                "config"
                            ],
                            "properties": {
                                "image": {},
                                "javaOptions": {},
                                "annotations": {},
                                "replicaCount": {},
                                "debug": {},
                                "logging": {},
                                "profiling": {},
                                "resources": {},
                                "kafka": {},
                                "extraArgs": {},
                                "config": {
                                    "$ref": "#/$defs/persistentStorageRuntimeConnectionSettings"
                                }
                            },
                            "examples": [{
                                "image": {
                                    "registry": "",
                                    "repository": "corda-os-uniqueness-worker",
                                    "tag": ""
                                },
                                "replicaCount": 1,
                                "debug": {
                                    "enabled": false,
                                    "suspend": false
                                },
                                "logging": {
                                    "level": "warn"
                                },
                                "profiling": {
                                    "enabled": false
                                },
                                "resources": {
                                    "requests": {
                                        "cpu": "1",
                                        "memory": "2048Mi"
                                    },
                                    "limits": {
                                        "cpu": "1",
                                        "memory": "2048Mi"
                                    }
                                }
                            }]
                        }
                    ]
                }
            },
            "examples": [{
                "crypto": {
                    "image": {
                        "registry": "",
                        "repository": "corda-os-crypto-worker",
                        "tag": ""
                    },
                    "replicaCount": 1,
                    "debug": {
                        "enabled": false,
                        "suspend": false
                    },
                    "logging": {
                        "level": "warn"
                    },
                    "profiling": {
                        "enabled": false
                    },
                    "resources": {
                        "requests": {
                            "cpu": "1",
                            "memory": "2048Mi"
                        },
                        "limits": {
                            "cpu": "1",
                            "memory": "2048Mi"
                        }
                    }
                },
                "db": {
                    "image": {
                        "registry": "corda-os-docker.software.r3.com",
                        "repository": "corda-os-db-worker",
                        "tag": ""
                    },
                    "replicaCount": 1,
                    "debug": {
                        "enabled": false,
                        "suspend": false
                    },
                    "logging": {
                        "level": "warn"
                    },
                    "profiling": {
                        "enabled": false
                    },
                    "resources": {
                        "requests": {
                            "cpu": "1",
                            "memory": "2048Mi"
                        },
                        "limits": {
                            "cpu": "1",
                            "memory": "2048Mi"
                        }
                    }
                },
                "flow": {
                    "image": {
                        "registry": "corda-os-docker.software.r3.com",
                        "repository": "corda-os-flow-worker",
                        "tag": ""
                    },
                    "replicaCount": 1,
                    "debug": {
                        "enabled": false,
                        "suspend": false
                    },
                    "logging": {
                        "level": "warn"
                    },
                    "profiling": {
                        "enabled": false
                    },
                    "resources": {
                        "requests": {
                            "cpu": "1",
                            "memory": "2048Mi"
                        },
                        "limits": {
                            "cpu": "1",
                            "memory": "2048Mi"
                        }
                    },
                    "verifyInstrumentation": false
                },
                "flowMapper": {
                    "image": {
                        "registry": "corda-os-docker.software.r3.com",
                        "repository": "corda-os-flow-mapper-worker",
                        "tag": ""
                    },
                    "replicaCount": 1,
                    "debug": {
                        "enabled": false,
                        "suspend": false
                    },
                    "logging": {
                        "level": "warn"
                    },
                    "profiling": {
                        "enabled": false
                    },
                    "resources": {
                        "requests": {
                            "cpu": "1",
                            "memory": "2048Mi"
                        },
                        "limits": {
                            "cpu": "1",
                            "memory": "2048Mi"
                        }
                    },
                    "verifyInstrumentation": false
                },
                "verification": {
                    "image": {
                        "registry": "corda-os-docker.software.r3.com",
                        "repository": "corda-os-verification-worker",
                        "tag": ""
                    },
                    "replicaCount": 1,
                    "debug": {
                        "enabled": false,
                        "suspend": false
                    },
                    "logging": {
                        "level": "warn"
                    },
                    "profiling": {
                        "enabled": false
                    },
                    "resources": {
                        "requests": {
                            "cpu": "1",
                            "memory": "2048Mi"
                        },
                        "limits": {
                            "cpu": "1",
                            "memory": "2048Mi"
                        }
                    },
                    "verifyInstrumentation": false
                },
                "membership": {
                    "image": {
                        "registry": "corda-os-docker.software.r3.com",
                        "repository": "corda-os-member-worker",
                        "tag": ""
                    },
                    "replicaCount": 1,
                    "debug": {
                        "enabled": false,
                        "suspend": false
                    },
                    "logging": {
                        "level": "warn"
                    },
                    "profiling": {
                        "enabled": false
                    },
                    "resources": {
                        "requests": {
                            "cpu": "1",
                            "memory": "2048Mi"
                        },
                        "limits": {
                            "cpu": "1",
                            "memory": "2048Mi"
                        }
                    }
                },
                "rest": {
                    "image": {
                        "registry": "corda-os-docker.software.r3.com",
                        "repository": "corda-os-rest-worker",
                        "tag": ""
                    },
                    "replicaCount": 1,
                    "debug": {
                        "enabled": false,
                        "suspend": false
                    },
                    "logging": {
                        "level": "warn"
                    },
                    "profiling": {
                        "enabled": false
                    },
                    "resources": {
                        "requests": {
                            "cpu": "1",
                            "memory": "2048Mi"
                        },
                        "limits": {
                            "cpu": "1",
                            "memory": "2048Mi"
                        }
                    },
                    "service": {
                        "type": "ClusterIP",
                        "port": 443,
                        "externalTrafficPolicy": "",
                        "loadBalancerSourceRanges": [],
                        "annotations": {}
                    },
                    "ingress": {
                        "annotations": {
                            "cert-manager.io/cluster-issuer": "production",
                            "nginx.ingress.kubernetes.io/backend-protocol": "HTTPS"
                        },
                        "className": "nginx",
                        "hosts": [
                            "rest-worker-1234.dev.corda.cloud"
                        ]
                    }
                },
                "p2pLinkManager": {
                    "image": {
                        "registry": "corda-os-docker.software.r3.com",
                        "repository": "corda-os-p2p-link-manager-worker",
                        "tag": ""
                    },
                    "replicaCount": 1,
                    "debug": {
                        "enabled": false,
                        "suspend": false
                    },
                    "logging": {
                        "level": "warn"
                    },
                    "profiling": {
                        "enabled": false
                    },
                    "resources": {
                        "requests": {
                            "cpu": "1",
                            "memory": "2048Mi"
                        },
                        "limits": {
                            "cpu": "1",
                            "memory": "2048Mi"
                        }
                    }
                },
                "p2pGateway": {
                    "image": {
                        "registry": "corda-os-docker.software.r3.com",
                        "repository": "corda-os-p2p-gateway-worker",
                        "tag": ""
                    },
                    "replicaCount": 1,
                    "debug": {
                        "enabled": false,
                        "suspend": false
                    },
                    "logging": {
                        "level": "warn"
                    },
                    "profiling": {
                        "enabled": false
                    },
                    "resources": {
                        "requests": {
                            "cpu": "1",
                            "memory": "2048Mi"
                        },
                        "limits": {
                            "cpu": "1",
                            "memory": "2048Mi"
                        }
                    },
                    "service": {
                        "port": 8080
                    }
                },
                "persistence": {
                    "image": {
                        "registry": "corda-os-docker.software.r3.com",
                        "repository": "corda-os-persistence-worker",
                        "tag": ""
                    },
                    "replicaCount": 1,
                    "debug": {
                        "enabled": false,
                        "suspend": false
                    },
                    "logging": {
                        "level": "warn"
                    },
                    "profiling": {
                        "enabled": false
                    },
                    "resources": {
                        "requests": {
                            "cpu": "1",
                            "memory": "2048Mi"
                        },
                        "limits": {
                            "cpu": "1",
                            "memory": "2048Mi"
                        }
                    }
                },
                "uniqueness": {
                    "image": {
                        "registry": "corda-os-docker.software.r3.com",
                        "repository": "corda-os-uniqueness-worker",
                        "tag": ""
                    },
                    "replicaCount": 1,
                    "debug": {
                        "enabled": false,
                        "suspend": false
                    },
                    "logging": {
                        "level": "warn"
                    },
                    "profiling": {
                        "enabled": false
                    },
                    "resources": {
                        "requests": {
                            "cpu": "1",
                            "memory": "2048Mi"
                        },
                        "limits": {
                            "cpu": "1",
                            "memory": "2048Mi"
                        }
                    }
                }
            }]
        }
    },
    "$defs": {
        "worker": {
            "type": "object",
            "default": {},
            "title": "worker configuration",
            "required": [
                "image",
                "replicaCount",
                "resources"
            ],
            "properties": {
                "image": {
                    "type": "object",
                    "default": {},
                    "title": "worker image configuration",
                    "required": [
                        "repository"
                    ],
                    "additionalProperties": false,
                    "properties": {
                        "registry": {
                            "type": "string",
                            "default": "",
                            "title": "worker image registry, defaults to image.registry",
                            "examples": [
                                "corda-os-docker.software.r3.com"
                            ]
                        },
                        "repository": {
                            "type": "string",
                            "title": "worker image repository",
                            "examples": [
                                "corda-os-xxx-worker"
                            ],
                            "minLength": 1
                        },
                        "tag": {
                            "type": "string",
                            "default": "",
                            "title": "worker image tag, defaults to image.tag",
                            "examples": [
                                ""
                            ]
                        }
                    },
                    "examples": [{
                        "registry": "corda-os-docker.software.r3.com",
                        "repository": "corda-os-xxx-worker",
                        "tag": ""
                    }]
                },
                "javaOptions": {
                    "type": "string"
                },
                "annotations": {
                    "type": "object",
                    "default": {},
                    "title": "custom annotations for the worker",
                    "required": [],
                    "properties": {},
                    "examples": [{}]
                },
                "replicaCount": {
                    "type": "integer",
                    "default": 1,
                    "title": "worker replica count",
                    "examples": [
                        1
                    ]
                },
                "debug": {
                    "type": "object",
                    "default": {},
                    "title": "worker debug configuration",
                    "required": [
                        "enabled"
                    ],
                    "additionalProperties": false,
                    "properties": {
                        "enabled": {
                            "type": "boolean",
                            "default": false,
                            "title": "run worker with debug enabled",
                            "examples": [
                                false
                            ]
                        },
                        "suspend": {
                            "type": "boolean",
                            "default": false,
                            "title": "if debug is enabled, suspend the worker until the debugger is attached",
                            "examples": [
                                false
                            ]
                        }
                    },
                    "if": {
                        "properties": {
                            "enabled": {
                                "const": true
                            }
                        }
                    },
                    "then": {
                        "required": [
                            "suspend"
                        ]
                    },
                    "examples": [{
                        "enabled": true,
                        "suspend": false
                    }]
                },
                "logging": {
                    "type": "object",
                    "default": {},
                    "title": "logging configuration",
                    "additionalProperties": false,
                    "properties": {
                        "level": {
                            "type": ["string", "null"],
                            "default": null,
                            "title": "log level (defaults to logging.level if not specified)",
                            "examples": [
                                "warn"
                            ],
                            "enum": ["all","trace","debug","info","warn","error","fatal","off", null]
                        },
                        "override": {
                            "type": "string",
                            "default": "",
                            "title": "additional Log4j 2 XML configuration"
                        }
                    },
                    "examples": [{
                        "level": "warn"
                    }]
                },
                "profiling": {
                    "type": "object",
                    "default": {},
                    "title": "profiling configuration",
                    "required": [
                        "enabled"
                    ],
                    "additionalProperties": false,
                    "properties": {
                        "enabled": {
                            "type": "boolean",
                            "default": false,
                            "title": "run worker with profiling enabled",
                            "examples": [
                                false
                            ]
                        }
                    },
                    "examples": [{
                        "enabled": false
                    }]
                },
                "resources": {
                    "type": "object",
                    "default": {},
                    "title": "resource limits and requests configuration for the worker containers.",
                    "required": [
                        "requests",
                        "limits"
                    ],
                    "additionalProperties": false,
                    "properties": {
                        "requests": {
                            "type": "object",
                            "default": {},
                            "title": "the CPU/memory resource requests for the worker containers",
                            "required": [],
                            "properties": {
                                "cpu": {"type": "string"},
                                "memory": {"type": "string"}
                            },
                            "additionalProperties": false,
                            "examples": [{
                                "cpu": "1",
                                "memory": "2048Mi"
                            }]
                        },
                        "limits": {
                            "type": "object",
                            "default": {},
                            "title": "the CPU/memory resource limits for the worker containers",
                            "required": [],
                            "properties": {
                                "cpu": {"type": "string"},
                                "memory": {"type": "string"}
                            },
                            "additionalProperties": false,
                            "examples": [{
                                "cpu": "1",
                                "memory": "2048Mi"
                            }]
                        }
                    },
                    "examples": [{
                        "requests": {
                            "cpu": "1",
                            "memory": "2048Mi"
                        },
                        "limits": {
                            "cpu": "1",
                            "memory": "2048Mi"
                        }
                    }]
                },
                "kafka": {
                    "type": "object",
                    "title": "kafka configuration",
                    "properties": {
                        "sasl": {
                            "type": "object",
                            "title": "kafka SASL credentials",
                            "properties": {
                                "username": {
                                    "$ref": "#/$defs/config"
                                },
                                "password": {
                                    "$ref": "#/$defs/config"
                                }
                            },
                            "additionalProperties": false
                        },
                        "additionalProperties": false
                    }
                },
                "extraArgs": {
                    "type": "array",
                    "default": [],
                    "title": "Extra command-line arguments for the worker",
                    "items": {
                        "type": "string"
                    },
                    "examples": [
                        []
                    ]
                }
            },
            "examples": [{
                "image": {
                    "registry": "",
                    "repository": "corda-os-xxx-worker",
                    "tag": ""
                },
                "replicaCount": 1,
                "debug": {
                    "enabled": false,
                    "suspend": false
                },
                "logging": {
                    "level": "warn"
                },
                "profiling": {
                    "enabled": false
                },
                "resources": {
                    "requests": {
                        "cpu": "1",
                        "memory": "2048Mi"
                    },
                    "limits": {
                        "cpu": "1",
                        "memory": "2048Mi"
                    }
                }
            }]
        },
        "config": {
            "type": "object",
            "title": "configuration for which a value may be provided inline or via a secret",
            "additionalProperties": false,
            "properties": {
                "value": {
                    "type": "string",
                    "default": "",
                    "title": "the value"
                },
                "valueFrom": {
                    "type": "object",
                    "default": {},
                    "title": "an alternative location for the value",
                    "additionalProperties": false,
                    "properties": {
                        "secretKeyRef": {
                            "type": "object",
                            "title": "a reference to a value in a secret",
                            "required": [
                                "name",
                                "key"
                            ],
                            "additionalProperties": false,
                            "properties": {
                                "name": {
                                    "type": "string",
                                    "default": "",
                                    "title": "the name of the secret"
                                },
                                "key": {
                                    "type": "string",
                                    "default": "",
                                    "title": "the key in the secret corresponding to the required value"
                                }
                            }
                        }
                    }
                }
            }
        },
        "databaseEngine": {
            "type": "string",
            "default": "postgresql",
            "title": "The Database Engine Type",
            "enum": [
                "postgresql"
            ]
        },
        "basicAuthConfig": {
            "type": "object",
            "default": {},
            "title": "Configuration for which username and password may be provided inline or via a secret",
            "additionalProperties": false,
            "properties": {
                "username": {
                    "$ref": "#/$defs/config"
                },
                "password": {
                    "$ref": "#/$defs/config"
                }
            }
        },
        "connectionPool": {
            "type": "object",
            "default": {},
            "title": "Connection pool configuration for JDBC connections",
            "required": [
                "maxSize",
                "idleTimeoutSeconds",
                "maxLifetimeSeconds",
                "keepAliveTimeSeconds",
                "validationTimeoutSeconds"
            ],
            "additionalProperties": false,
            "properties": {
                "maxSize": {
                    "type": "integer",
                    "default": 5,
                    "title": "Maximum pool size",
                    "examples": [
                        5
                    ]
                },
                "minSize": {
                    "anyOf": [
                        {
                            "type": "integer",
                            "minimum": 0
                        },
                        {
                            "type": "null"
                        }
                    ],
                    "default": null,
                    "title": "Minimum pool size (defaults to pool's max size value when null)"
                },
                "idleTimeoutSeconds": {
                    "type": "integer",
                    "default": 120,
                    "minimum": 0,
                    "title": "Maximum time (in seconds) a connection can stay idle in the pool; A value of 0 means that idle connections are never removed from the pool"
                },
                "maxLifetimeSeconds": {
                    "type": "integer",
                    "default": 1800,
                    "minimum": 1,
                    "title": "Maximum time (in seconds) a connection can stay in the pool, regardless if it has been idle or has been recently used; If a connection is in-use and has reached \"maxLifetimeSeconds\" timeout, it will be removed from the pool only when it becomes idle"
                },
                "keepAliveTimeSeconds": {
                    "type": "integer",
                    "default": 0,
                    "minimum": 0,
                    "title": "Interval time (in seconds) in which connections will be tested for aliveness; Connections which are no longer alive are removed from the pool; A value of 0 means this check is disabled"
                },
                "validationTimeoutSeconds": {
                    "type": "integer",
                    "minimum": 1,
                    "default": 5,
                    "title": "Maximum time (in seconds) that the pool will wait for a connection to be validated as alive"
                }
            }
        },
        "databaseTemplate": {
            "type": "object",
            "default": {},
            "title": "Connection settings for databases used by the Platform",
            "additionalProperties": false,
            "required": [
                "id"
            ],
            "properties": {
                "id": {
                    "type": "string",
                    "minLength": 1
                },
                "name": {
                    "type": "string",
                    "minLength": 1
                },
                "host": {
                    "anyOf": [
                        {
                            "type": "string",
                            "format": "hostname"
                        },
                        {
                            "type": "null"
                        }
                    ],
                    "default": null,
                    "title": "The database host"
                },
                "port": {
                    "type": "integer",
                    "default": 5432,
                    "title": "The database port",
                    "examples": [
                        5432
                    ]
                },
                "type": {
                    "$ref": "#/$defs/databaseEngine"
                }
            }
        },
        "persistentStorageMapping": {
            "type": "object",
            "default": {},
            "title": "Mapping to a defined Persistent Storage",
            "required": [
                "type",
                "storageId",
                "partition"
            ],
            "properties": {
                "type": {
                    "type": "string",
                    "default": "Database",
                    "title": "The type of the persistent storage",
                    "enum": [
                        "Database"
                    ]
                },
                "storageId": {
                    "type": "string",
                    "minLength": 1,
                    "default": "default",
                    "title": "The id of the persistent storage, defined elsewhere"
                },
                "partition": {
                    "type": "string",
                    "minLength": 1,
                    "default": "default",
                    "title": "The name of the internal representation (schema, region, partition, namespace, etc.) within the persistent storage"
                }
            }
        },
        "persistentStorageRuntimeConnectionSettings": {
            "type": "object",
            "default": {},
            "title": "Runtime connection settings for a given Persistent Storage",
            "required": [
                "type"
            ],
            "properties": {
                "type": {
                    "type": "string",
                    "default": "Database",
                    "title": "The type of the persistent storage",
                    "enum": [
                        "Database"
                    ]
                },
                "username": {
                    "oneOf": [
                        {
                            "$ref": "#/$defs/config"
                        },
                        {
                            "type": "null"
                        }
                    ]
                },
                "password": {
                    "oneOf": [
                        {
                            "$ref": "#/$defs/config"
                        },
                        {
                            "type": "null"
                        }
                    ]
                },
                "connectionPool": {}
            },
            "if": {
                "properties": {
                    "type": {
                        "const": "Database"
                    }
                }
            },
            "then": {
                "properties": {
                    "connectionPool": {
                        "$ref": "#/$defs/connectionPool",
                        "default": {},
                        "title": "JDBC connection pool configuration for the persistent storage"
                    }
                }
            }
        }
    }
}
