postgresql-k8s

Charmed PostgreSQL K8s

Channel Revision Published Runs on
latest/stable 20 20 Sep 2022
Ubuntu 20.04
14/stable 495 18 Feb 2025
Ubuntu 22.04
14/stable 494 18 Feb 2025
Ubuntu 22.04
14/candidate 495 11 Feb 2025
Ubuntu 22.04
14/candidate 494 11 Feb 2025
Ubuntu 22.04
14/beta 495 06 Feb 2025
Ubuntu 22.04
14/beta 494 06 Feb 2025
Ubuntu 22.04
14/edge 549 28 Mar 2025
Ubuntu 22.04
14/edge 548 28 Mar 2025
Ubuntu 22.04
16/beta 525 19 Mar 2025
Ubuntu 24.04
16/beta 524 19 Mar 2025
Ubuntu 24.04
16/edge 551 Yesterday
Ubuntu 24.04
16/edge 550 Yesterday
Ubuntu 24.04
juju deploy postgresql-k8s --channel 14/stable
Show information

Platform:

Charm flowcharts

The file charm.py is the entrypoint for the charm. It contains functions for its basic operation, including its major hooks and file management. This file can be found at src/charm.py.

Hook Handler Flowcharts

These flowcharts detail the control flow of the hooks in this program. Unless otherwise stated, a hook deferral is always followed by a return.

Leader Elected Hook

Click to navigate the mermaid diagram on GitHub.

Mermaid Diagram

no

yes

no

yes

yes

no

no

yes

leader-elected Hook

Generate password for charm users?

Create k8s resources\n needed by Patroni

Is current unit \n part of the cluster?

Add current unit \n to the cluster

Remove pending departed \n units from the cluster

Has cluster\n initialised?

return

Are all the units \n part of the cluster?

Turn on/off PostgreSQL \n synchronous_commit configuration

Are all cluster \n members ready?

defer

Add unit to cluster

Patch pod labels of the new cluster member

return

PostgreSQL Pebble Ready Hook

Click to navigate the mermaid diagram on GitHub.

Mermaid Diagram

no

yes

no

yes

no

yes

no

yes

yes

no

no

yes

no

yes

leader-elected Hook

Create data\n directory

Is current unit\n leader or has the \n cluster initialised?

defer

Has successfully \n pushed TLS files?

defer

Have pebble \n services changed?

Have Patroni and \n PostgreSQL started in \n the current unit?

Update and restart \n the PostgreSQL service

defer

Is current\nunit leader?

Has successfully \n patched pod labels of \n the new current unit

Turn on/off PostgreSQL \n synchronous_commit configuration

Set Blocked\nstatus

return

Is custom k8s service \n redirecting traffic to \n primary pod?

Set Waiting\nstatus

defer

Mark cluster as initialised

Set Active\n Status

return


Help improve this document in the forum (guidelines). Last updated 7 months ago.