Interfaces and endpoints

vmk8s

The charm supports modern postgresql_client and legacy pgsql interfaces (in a backward compatible mode).

Modern interfaces

This charm provides modern postgresql_client interface . Applications can easily connect PostgreSQL using data_interfaces library from data-platform-libs .

Modern postgresql_client interface (database endpoint)

See also: Integrate with your charm.

Adding a relation is accomplished with juju integrate (or relate for Juju 2.9) via the database endpoint.

For example:

# Deploy Charmed PostgreSQL cluster with 3 nodes
juju deploy postgresql -n 3 --channel 14/stable

# Deploy the relevant application charms
juju deploy mycharm

# Relate PostgreSQL with your application
juju relate postgresql:database mycharm:database

# Check established relation (using postgresql_client interface):
juju status --relations

# Example of a properly established relation:
# > Relation provider      Requirer          Interface          Type
# > postgresql:database    mycharm:database  postgresql_client  regular
# Deploy Charmed PostgreSQL cluster with 3 nodes
juju deploy postgresql-k8s --channel 14/stable -n 3 --trust

# Deploy the relevant application charms
juju deploy mycharm

# Relate PostgreSQL with your application
juju relate postgresql-k8s:database mycharm:database

# Check established relation (using postgresql_client interface):
juju status --relations

# Example of a properly established relation:
# > Relation provider          Requirer          Interface          Type
# > postgresql-k8s:database    mycharm:database  postgresql_client  regular

See the Users page for more details about default and additional database user roles.

Legacy interfaces

Legacy relations are deprecated and will be discontinued on future releases. Their usage should be avoided.

Check the the limitations of legacy interface implementations in Legacy charm.

Legacy pgsql interface (db and db-admin endpoints):

This charm supports legacy interface pgsql from the previous PostgreSQL charm .

For example:

juju relate postgresql:db mailman3-core
juju relate postgresql:db-admin landscape-server
juju deploy postgresql-k8s --channel 14/stable --trust
juju deploy finos-waltz-k8s --channel edge
juju relate postgresql-k8s:db finos-waltz-k8s