Charmed PostgreSQL K8s

Canonical Publisher

Platform:

Channel Revision Published Runs on
latest/stable 20 20 Sep 2022
Ubuntu 20.04
14/stable 925 23 Jun 2026
Ubuntu 22.04
14/stable 924 23 Jun 2026
Ubuntu 22.04
14/candidate 925 16 Jun 2026
Ubuntu 22.04
14/candidate 924 16 Jun 2026
Ubuntu 22.04
14/beta 925 16 Jun 2026
Ubuntu 22.04
14/beta 924 16 Jun 2026
Ubuntu 22.04
14/edge 935 05 Jul 2026
Ubuntu 22.04
14/edge 934 05 Jul 2026
Ubuntu 22.04
16/stable 927 23 Jun 2026
Ubuntu 24.04
16/stable 926 23 Jun 2026
Ubuntu 24.04
16/candidate 927 16 Jun 2026
Ubuntu 24.04
16/candidate 926 16 Jun 2026
Ubuntu 24.04
16/beta 927 16 Jun 2026
Ubuntu 24.04
16/beta 926 16 Jun 2026
Ubuntu 24.04
16/edge 931 03 Jul 2026
Ubuntu 24.04
16/edge 930 03 Jul 2026
Ubuntu 24.04
juju deploy postgresql-k8s --channel 14/stable --trust

charms.postgresql_k8s.v0.postgresql_tls

In this class we manage certificates relation.

This class handles certificate request and renewal through the interaction with the TLS Certificates Operator.

This library needs that the following libraries are imported to work:

  • https://charmhub.io/certificate-transfer-interface/libraries/certificate_transfer
  • https://charmhub.io/tls-certificates-interface/libraries/tls_certificates

It also needs the following methods in the charm class: — get_hostname_by_unit: to retrieve the DNS hostname of the unit. — get_secret: to retrieve TLS files from secrets. — push_tls_files_to_workload: to push TLS files to the workload container and enable TLS. — set_secret: to store TLS files as secrets. — update_config: to disable TLS when relation with the TLS Certificates Operator is broken.


class PostgreSQLTLS

Description

In this class we manage certificates relation. None

Methods

PostgreSQLTLS. __init__( self , charm , peer_relation: str , additional_dns_names )

Description

Manager of PostgreSQL relation with TLS Certificates Operator. None

PostgreSQLTLS. get_tls_files( self )

Prepare TLS files in special PostgreSQL way.

Description

PostgreSQL needs three files: — CA file should have a full chain. — Key file should have private key. — Certificate file should have certificate without certificate chain.