Charmed PostgreSQL K8s

Canonical Publisher

Platform:

Channel Revision Published Runs on
latest/stable 20 20 Sep 2022
Ubuntu 20.04
14/stable 774 02 Mar 2026
Ubuntu 22.04
14/stable 775 02 Mar 2026
Ubuntu 22.04
14/candidate 774 27 Feb 2026
Ubuntu 22.04
14/candidate 775 27 Feb 2026
Ubuntu 22.04
14/beta 774 27 Feb 2026
Ubuntu 22.04
14/beta 775 27 Feb 2026
Ubuntu 22.04
14/edge 896 22 Apr 2026
Ubuntu 22.04
14/edge 895 22 Apr 2026
Ubuntu 22.04
16/candidate 901 Today
Ubuntu 24.04
16/candidate 902 Today
Ubuntu 24.04
16/beta 901 Today
Ubuntu 24.04
16/beta 902 Today
Ubuntu 24.04
16/edge 902 Today
Ubuntu 24.04
16/edge 901 Today
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.