PostgreSQLDatabase
Kubernetes API reference for the PostgreSQLDatabase resource of Entigo Platform (database.entigo.com/v1alpha1).
On this page
Packages:
database.entigo.com/v1alpha1
Section titled “database.entigo.com/v1alpha1”Resource Types:
PostgreSQLDatabase
Section titled “PostgreSQLDatabase”| Name | Type | Description | Required |
|---|---|---|---|
| apiVersion | string | database.entigo.com/v1alpha1 | true |
| kind | string | PostgreSQLDatabase | true |
| metadata | object | Refer to the Kubernetes API documentation for the fields of the metadata field. | true |
| spec | object | false |
PostgreSQLDatabase.spec
Section titled “PostgreSQLDatabase.spec”| Name | Type | Description | Required |
|---|---|---|---|
| instanceRef | object | true | |
| owner | string | Owner role name (PostgreSQL conventional name) | true |
| dbTemplate | string | The name of the template from which to create the new database | false |
| deletionProtection | boolean | Prevents accidental deletion of PostgreSQLDatabase resource Default: true | false |
| encoding | string | Character set encoding to use in the new database. Specify a string constant (e.g., ‘SQL_ASCII’), or an integer encoding number, or DEFAULT to use the default encoding (namely, the encoding of the template database). | false |
| extensionConfig | map[string]object | Per-extension configuration. Key is the extension name, value is a configuration object. | false |
| extensions | []enum | List of PostgreSQL extensions to enable. Enum: postgis, postgis_topology, fuzzystrmatch, postgis_tiger_geocoder, uuid-ossp, btree_gist | false |
| lcCType | string | Character classification (LC_CTYPE) to use in the new database. This affects the categorization of characters, e.g. lower, upper and digit. The default is to use the character classification of the template database. | false |
| lcCollate | string | Collation order (LC_COLLATE) to use in the new database. This affects the sort order applied to strings, e.g. in queries with ORDER BY, as well as the order used in indexes on text columns. The default is to use the collation order of the template database. | false |
| name | string | Alternative, i.e. non kubernetes compliant name | false |
PostgreSQLDatabase.spec.instanceRef
Section titled “PostgreSQLDatabase.spec.instanceRef”| Name | Type | Description | Required |
|---|---|---|---|
| name | string | Name of the database instance the db should be created in | true |
PostgreSQLDatabase.spec.extensionConfig[key]
Section titled “PostgreSQLDatabase.spec.extensionConfig[key]”| Name | Type | Description | Required |
|---|---|---|---|
| schema | string | Schema in which to create the extension objects | false |
Basic Database
A minimal PostgreSQL Database definition showing the required fields only.apiVersion: database.entigo.com/v1alpha1kind: PostgreSQLDatabasemetadata: name: basic-databasespec: owner: owner instanceRef: name: basic-instanceA PostgreSQL Database definition showing localization and extensions setup.
apiVersion: database.entigo.com/v1alpha1kind: PostgreSQLDatabasemetadata: name: database-with-extensionsspec: owner: owner encoding: "UTF8" lcCType: "et_EE.UTF-8" lcCollate: "et_EE.UTF-8" dbTemplate: template0 instanceRef: name: basic-instance extensions: - postgis - postgis_topology - fuzzystrmatch - postgis_tiger_geocoder - uuid-ossp - btree_gist extensionConfig: postgis_topology: schema: topology postgis_tiger_geocoder: schema: tigerPrerequisites
The PostgreSQL Database requires the following resources applied:PostgreSQLInstance
Section titled “PostgreSQLInstance”apiVersion: database.entigo.com/v1alpha1kind: PostgreSQLInstancemetadata: name: basic-instancespec: allocatedStorage: 20 instanceType: db.t3.small engineVersion: "17.10"PostgreSQLUser (Owner Role)
Section titled “PostgreSQLUser (Owner Role)”apiVersion: database.entigo.com/v1alpha1kind: PostgreSQLUsermetadata: name: ownerspec: instanceRef: name: basic-instance createDb: true createRole: true