Reference / experimental
db-operator-database
These docs describe Kix's main branch, which can include changes not yet released. Read the docs for the latest release.
PostgreSQL database, login role, and credentials Secret for one application, created by DB Operator
This page is generated from kix/packages/experimental/db-operator-database.
| Stability | Experimental |
package value | packages.experimental.db-operator-database |
| Default aliases | database |
Dependencies
Section titled “Dependencies”Kix matches each dependency below to another package instance by instance name, alias, or role. To bind a specific instance, set deps.<name> in your cluster definition. See Declaring dependencies for how required and optional dependencies work.
| Dependency | Requirement |
|---|---|
dbInstance | Required |
dbOperator | Required |
Options
Section titled “Options”extensions
Section titled “extensions”PostgreSQL extensions to enable in this database (spec.postgres.extensions).
Write each entry as an extension name such as "citext" (or
{ name = "citext"; version = null; }, which application packages may pass
automatically). Every listed extension must be installed on the PostgreSQL
server. Kix rejects non-null version values because DB Operator always
installs the server’s default version.
- Type:
list of (string or (submodule)) - Default:
[ ]
extraSpec
Section titled “extraSpec”Additional fields merged into the Database spec, such as
postgres.schemas or deletionProtected (which defaults to true). Kix
rejects instance, secretName, existingUser, credentials.templates,
secretsTemplates, and postgres.extensions here because this package
manages those settings.
-
Type:
attribute set of anything -
Default:
{ } -
Example:
1{2postgres = {3schemas = [4"app"5];6};7}
templates
Section titled “templates”Extra keys for DB Operator to render into the <instance>-credentials Secret.
Each value is a Go template that can use the fields .Username, .Password,
.Hostname, .Port, .Database, and .Protocol, and the functions
.Secret, .ConfigMap, .Query, and .InstanceVar. Kix rejects any other
template field, as well as key names already provided or reserved (POSTGRES_DB,
POSTGRES_USER, POSTGRES_PASSWORD, username, password, DB, USER,
PASSWORD, CLICKHOUSE_DB, CLICKHOUSE_USER, and CLICKHOUSE_PASSWORD). DB
Operator inserts values without escaping, so special characters in a generated
password can break a URL template.
-
Type:
attribute set of string -
Default:
{ } -
Example:
1{2DATABASE_URL = "postgresql://{{ .Username }}:{{ .Password }}@{{ .Hostname }}:{{ .Port }}/{{ .Database }}";3}