Struct controller::apis::coredb_types::CoreDBSpec
source · pub struct CoreDBSpec {Show 25 fields
pub replicas: i32,
pub resources: ResourceRequirements,
pub storage: Quantity,
pub sharedirStorage: Quantity,
pub pkglibdirStorage: Quantity,
pub postgresExporterEnabled: bool,
pub image: String,
pub postgresExporterImage: String,
pub port: i32,
pub uid: i32,
pub extensions: Vec<Extension>,
pub trunk_installs: Vec<TrunkInstall>,
pub stop: bool,
pub serviceAccountTemplate: ServiceAccountTemplate,
pub backup: Backup,
pub metrics: Option<PostgresMetrics>,
pub extra_domains_rw: Option<Vec<String>>,
pub ip_allow_list: Option<Vec<String>>,
pub stack: Option<Stack>,
pub runtime_config: Option<Vec<PgConfig>>,
pub override_configs: Option<Vec<PgConfig>>,
pub connectionPooler: ConnectionPooler,
pub app_services: Option<Vec<AppService>>,
pub restore: Option<Restore>,
pub storage_class: Option<String>,
}
Expand description
Generate the Kubernetes wrapper struct CoreDB
from our Spec and Status struct
This provides a hook for generating the CRD yaml (in crdgen.rs) CoreDBSpec represents the specification for a CoreDB instance. It defines various configuration options for deploying and managing the database. with the tembo-controller
§Basic CoreDB Configuration
apiVersion: coredb.io/v1alpha1
kind: CoreDB
metadata:
name: test-db
spec: {}
Fields§
§replicas: i32
Number of CoreDB replicas to deploy.
Default: 1.
resources: ResourceRequirements
The resource requirements (CPU/Memory) for the CoreDB instance. This is the same format as what is set for a Kubernetes Pod. See https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
Limits Default: 2 CPU and 2Gi memory.
Requests Default: 500m CPU and 512Mi memory.
storage: Quantity
DEPRECATED The storage size for the sharedir volume. This is no longer used and will be removed in a future release.
pkglibdirStorage: Quantity
DEPRECATED The storage size for the pkglibdir volume. This is no longer used and will be removed in a future release.
postgresExporterEnabled: bool
DEPRECATED Enable the use of the Postgres Exporter deployment for metrics collection This is no longer used and will be removed in a future release.
image: String
The Postgres image to use for the CoreDB instance deployment. This should be a valid Postgres image that is compatible with the https://tembo.io platform. For more information please visit our tembo-images repository.
Default: quay.io/tembo/standard-cnpg:15.3.0-1-0c19c7e
postgresExporterImage: String
DEPRECATED The postgres-exporter image you want to use for the postgres-exporter deployment. This is no longer used and will be removed in a future release.
port: i32
The port to expose the Postgres service on.
Default: 5432.
uid: i32
DEPRECATED The UID to run the Postgres container as. This is no longer used and will be removed in a future release.
We currently run the Postgres container with UID 26.
extensions: Vec<Extension>
A list of extensions to enable on the CoreDB instance.
This list should be a lits of extension names that are already available
on the Postgres instance you are running. To install extensions at runtime
please see the trunk_installs
field.
Default: []
trunk_installs: Vec<TrunkInstall>
A list of extensions to install from the pgtrunk registry. This list should be a list of extension names and versions that you wish to install at runtime using the pgtrunk API.
Default: []
stop: bool
This option allows you to stop the database instance.
Default: false.
serviceAccountTemplate: ServiceAccountTemplate
The serviceAccountTemplate contains the template needed to generate the service accounts to be used by the underlying Postgres instance
For more information on service accounts please see the Kubernetes documentation and the cloudnative-pg docs on ServiceAccountTemplates
Default: ServiceAccountTemplate { metadata: None }
backup: Backup
The backup configuration for the CoreDB instance to facilitate database backups and WAL archive uploads to an S3 compatible object store.
Default: disabled
metrics: Option<PostgresMetrics>
The metrics configuration to allow for custom Postgres metrics to be exposed in postgres-exporter and Prometheus.
Default: disabled
extra_domains_rw: Option<Vec<String>>
The list of domains to add to the IngressRouteTCP generated in the tembo-controller to route traffic to the Postgres instance using SNI based routing of encrypted TLS traffic into the correct instance.
Default: disabled
ip_allow_list: Option<Vec<String>>
List of IPv4 CIDR blocks to allow access to the Postgres instance.
Default: Allow all
stack: Option<Stack>
The stack configuration for the CoreDB instance. This is mainly used for the https://tembo.io platform to allow for the deployment of pre-configured Postgres instances.
runtime_config: Option<Vec<PgConfig>>
The runtime_config is a way to set the Postgres configuration at runtime. This is a list of PgConfig objects that define the Postgres configuration
For more information on what you can set, please refer to the cloudnative-pg documentation on setting Postgres Parameters
Default: disabled
override_configs: Option<Vec<PgConfig>>
The override_configs configuration is typically used by the https://cloud.tembo.io platform to allow the user to override the Postgres configuration at runtime.
Default: disabled
connectionPooler: ConnectionPooler
Connection pooler configuration used to manage database connections, sitting between your application and Postgres instance. Currently when configured this will configure a PgBouncer instance in the namespace of your deployment
Default: disabled
app_services: Option<Vec<AppService>>
app_service is a way to define a service that is deployed alongside the Postgres instance. This is typically used to deploy a service that is used to connect to the Postgres instance in some manner.
Default: disabled
restore: Option<Restore>
The restore configuration provides a way to restore a database from a backup stored in an S3 compatible object store.
Default: disabled
storage_class: Option<String>
A StorageClass provides a way to describe the “classes” of storage offered in a cluster, including their provisioning, replication, and durability.
For more information on StorageClasses please see the Kubernetes documentation
Default: None
(uses the default
StorageClass in your cluster)
Implementations§
source§impl CoreDBSpec
impl CoreDBSpec
pub fn get_pg_configs( &self, requires_load: BTreeMap<String, String> ) -> Result<Option<Vec<PgConfig>>, MergeError>
pub fn get_pg_config_by_name( &self, config_name: &str, requires_load: BTreeMap<String, String> ) -> Result<Option<PgConfig>, MergeError>
Trait Implementations§
source§impl Clone for CoreDBSpec
impl Clone for CoreDBSpec
source§fn clone(&self) -> CoreDBSpec
fn clone(&self) -> CoreDBSpec
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for CoreDBSpec
impl Debug for CoreDBSpec
source§impl<'de> Deserialize<'de> for CoreDBSpec
impl<'de> Deserialize<'de> for CoreDBSpec
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
source§impl JsonSchema for CoreDBSpec
impl JsonSchema for CoreDBSpec
source§fn schema_name() -> String
fn schema_name() -> String
source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
source§fn json_schema(gen: &mut SchemaGenerator) -> Schema
fn json_schema(gen: &mut SchemaGenerator) -> Schema
source§fn is_referenceable() -> bool
fn is_referenceable() -> bool
$ref
keyword. Read more