Skip to content

database

A database and the credentials for it. A provider creates the database on a bound Postgres or MySQL instance.

apps.myapp.main.needs.database = {
engine = "postgres";
name = "myapp";
};
  • engineone of "postgres", "mysql"

    Database engine.

    Default
    "postgres"
  • 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
  • providernull or (podule provider reference (apps.<type>.<instance> or impl.<contract>.<name>))

    Overrides providers.database for this need.

    Default
    null
  • namenull or string

    Database name. Defaults to the name the provider creates.

    Default
    null
  • hostnull or string

    Bound host. Written by the database provider.

    Default
    null
  • passwordnull or (submodule)

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

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

    Bound port. Written by the database provider.

    Default
    null
  • usernull or string

    Bound user. Written by the database provider.

    Default
    null