Skip to content

db-operator

db-operator. Provides database by creating a Database CR per consumer against a bound Postgres instance.

providers.database = apps.db-operator.main;
apps.db-operator.main = {
database = apps.postgresql.main;
dbInstance = "postgres-main";
};

Provides

database10 options
  • engineone of "postgres", "mysql"

    Database engine.

    Default
    "postgres"
  • hostnull or string

    Bound host. Written by the database provider.

    Default
    null
  • namenull or string

    Database name. Defaults to the name the provider creates.

    Default
    null
  • passwordnull or (submodule)

    Bound secretRef for the password. Written by the database provider.

    Default
    null
  • password.keystring

    Key inside the Secret.

  • password.namestring

    Kubernetes Secret object name.

  • password.namespacenull or string

    Namespace of the Secret. Defaults to the namespace of the consumer that reads it.

    Default
    null
  • portnull or 16 bit unsigned integer; between 0 and 65535 (both inclusive)

    Bound port. Written by the database provider.

    Default
    null
  • providernull or (podule provider reference (apps.<type>.<instance> or impl.<contract>.<name>))

    Overrides providers.database for this need.

    Default
    null
  • usernull or string

    Bound user. Written by the database provider.

    Default
    null

Needs

secret7 options
  • <name>.externalboolean

    The operator supplies this value before apply. Other secrets are generated in the cluster.

    Default
    false
  • <name>.keyslist of string

    Keys stored in this Secret. Empty means one key named after the secret.

    Default
    [ ]
    Example
    [ "name" "user" "password" ]
  • <name>.refnull or (submodule)

    Bound secretRef for this secret. Written by the secret provider.

    Default
    null
  • <name>.ref.keystring

    Key inside the Secret.

  • <name>.ref.namestring

    Kubernetes Secret object name.

  • <name>.ref.namespacenull or string

    Namespace of the Secret. Defaults to the namespace of the consumer that reads it.

    Default
    null
  • providernull or (podule provider reference (apps.<type>.<instance> or impl.<contract>.<name>))

    Overrides providers.secret for this need. One provider handles every named secret.

    Default
    null
  • databasenull or (podule provider reference (apps.<type>.<instance> or impl.<contract>.<name>))

    In-cluster database app, such as apps.postgresql.main. Its host and admin secret are derived from this.

    Default
    null
  • dbInstancestring

    DbInstance name the Database CRs point at.

    Default
    "postgresql"
  • hostnull or string

    External database host. Overrides the host derived from database.

    Default
    null
  • port16 bit unsigned integer; between 0 and 65535 (both inclusive)

    Database port.

    Default
    5432