You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* add starter pack and sync tutorial with VM
* update deployment guides
* rename how-to-guides to how-to
* sync how-to guides with vm
* sync references with vm
* sync explanation pages with vm
* add .readthedocs.yaml and reduce .gitignore scope for requirements.txt file
* fix some formatting issues
* sync backup guides with vm
* fix misc. build errors and sync tutorial with vm
* add doc ci checks
* remove discourse sync workflow
* polish tutorial and deploy guide
* specify channel on all deploy commands
* sync misc. pages with vm
* minor README update with new documentation link
* ignore docs folder in development workflows
* remove sphinx python dependency check workflow
* update home page
* fix some broken links
* fix broken links
* fix spelling errors in docs
* fix spelling errors in other markdown files
* small spelling fix
Copy file name to clipboardExpand all lines: README.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -104,7 +104,7 @@ For more information, see the [Security policy](SECURITY.md).
104
104
105
105
## Contributing
106
106
107
-
Please see the [Juju SDK docs](https://juju.is/docs/sdk) for guidelines on enhancements to this charm following best practice guidelines, and [CONTRIBUTING.md](https://github.com/canonical/postgresql-k8s-operator/blob/main/CONTRIBUTING.md) for developer guidance.
107
+
Please see the [Juju SDK docs](https://documentation.ubuntu.com/juju/3.6/) for guidelines on enhancements to this charm following best practice guidelines, and [CONTRIBUTING.md](https://github.com/canonical/postgresql-k8s-operator/blob/main/CONTRIBUTING.md) for developer guidance.
Copy file name to clipboardExpand all lines: docs/explanation/architecture.md
+18-19Lines changed: 18 additions & 19 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,7 @@
6
6
7
7
## Juju K8s concept
8
8
9
-
The charm design leverages the [sidecar](https://kubernetes.io/blog/2015/06/the-distributed-system-toolkit-patterns/#example-1-sidecar-containers) pattern to allow multiple containers in each pod with [Pebble](https://juju.is/docs/sdk/pebble) running as the workload container’s entrypoint.
9
+
The charm design leverages the [sidecar](https://kubernetes.io/blog/2015/06/the-distributed-system-toolkit-patterns/#example-1-sidecar-containers) pattern to allow multiple containers in each pod with [Pebble](https://documentation.ubuntu.com/juju/3.6/reference/pebble/) running as the workload container’s entrypoint.
10
10
11
11
Pebble is a lightweight, API-driven process supervisor that is responsible for configuring processes to run in a container and controlling those processes throughout the workload lifecycle.
12
12
@@ -28,23 +28,23 @@ And if you run `kubectl describe pod postgresql-k8s-0`, all the containers will
28
28
29
29
## HLD (High Level Design)
30
30
31
-
The Charmed PostgreSQL K8s (`workload` container) based on `postgresql-image` resource defined in the [charm metadata.yaml](https://github.com/canonical/postgresql-k8s-operator/blob/main/metadata.yaml). It is an official Canonical [charmed-postgresql](https://github.com/canonical/charmed-postgresql-rock)[OCI/Rock](https://ubuntu.com/server/docs/rock-images/introduction) image, which is recursively based on the Canonical [`charmed-postgresql` snap].
31
+
The Charmed PostgreSQL K8s (`workload` container) based on `postgresql-image` resource defined in the [charm metadata.yaml](https://github.com/canonical/postgresql-k8s-operator/blob/main/metadata.yaml). It is an official Canonical [charmed-postgresql](https://github.com/canonical/charmed-postgresql-rock)[OCI/Rock](https://documentation.ubuntu.com/rockcraft/en/latest/explanation/rockcraft/) image, which is based on the Canonical [`charmed-postgresql` snap].
32
32
33
-
[Charmcraft](https://juju.is/docs/sdk/install-charmcraft) uploads an image as a [charm resource](https://charmhub.io/postgresql-k8s/resources/postgresql-image) to [Charmhub](https://charmhub.io/postgresql-k8s) during the [publishing](https://github.com/canonical/postgresql-k8s-operator/blob/main/.github/workflows/release.yaml), as described in the [Juju SDK How-to guides](https://juju.is/docs/sdk/publishing).
33
+
[Charmcraft](https://canonical-charmcraft.readthedocs-hosted.com/stable/) uploads an image as a [charm resource](https://charmhub.io/postgresql-k8s/resources/postgresql-image) to [Charmhub](https://charmhub.io/postgresql-k8s) during the [publishing](https://github.com/canonical/postgresql-k8s-operator/blob/main/.github/workflows/release.yaml).
34
34
35
-
The charm supports Juju deploymed to all Kubernetes environments: [MicroK8s](https://microk8s.io/), [Charmed Kubernetes](https://ubuntu.com/kubernetes/charmed-k8s), [GKE](https://charmhub.io/postgresql-k8s/docs/h-deploy-gke), [Amazon EKS](https://aws.amazon.com/eks/), ...
35
+
The charm supports Juju deployment on all Kubernetes environments: [MicroK8s](https://microk8s.io/), [Charmed Kubernetes](https://ubuntu.com/kubernetes/charmed-k8s), [GKE](/how-to/deploy/gke), [Amazon EKS](/how-to/deploy/aks)...
36
36
37
37
The OCI/Rock ships the following components:
38
38
39
39
* PostgreSQL Community Edition (based on [`charmed-postgresql` snap])
40
40
* Patroni (based on [`charmed-postgresql` snap])
41
41
* PgBouncer (based on [`charmed-postgresql` snap])
42
-
*pgBackRest (based on [`charmed-postgresql` snap])
42
+
*PgBackRest (based on [`charmed-postgresql` snap])
43
43
* Prometheus PostgreSQL Exporter (based on [`charmed-postgresql` snap])
44
44
* Prometheus PgBouncer Exporter (based on [`charmed-postgresql` snap])
45
45
* Prometheus Grafana dashboards and Loki alert rules are part of the charm revision (and missing in SNAP).
46
46
47
-
SNAP-based rock images guarantee the same components versions and functionality between VM and K8s charm flavors.
47
+
SNAP-based rock images guarantee the same components versions and functionality between VM and K8s charm flavours.
48
48
49
49
Pebble runs layers of all the currently enabled services, e.g. monitoring, backups, etc:
50
50
```text
@@ -84,7 +84,7 @@ The rock "charmed-postgresql" also ships list of tools used by charm:
84
84
85
85
### Data Integrator
86
86
87
-
[Data Integrator](https://charmhub.io/data-integrator) charm is a solution to request DB credentials for non-native Juju applications. Not all applications implement a data_interfaces relation but allow setting credentials via config. Also, some of the applications are run outside of juju. This integrator charm allows receiving credentials which can be passed into application config directly without implementing juju-native relation.
87
+
[Data Integrator](https://charmhub.io/data-integrator) charm is a solution to request DB credentials for non-native Juju applications. Not all applications implement a data_interfaces relation but allow setting credentials via config. Also, some of the applications are run outside of juju. This integrator charm allows receiving credentials which can be passed into application configuration directly without implementing juju-native relation.
88
88
89
89
### PostgreSQL Test App
90
90
@@ -96,7 +96,7 @@ GLAuth is a secure, easy-to-use and open-sourced LDAP server which provides capa
96
96
97
97
### Grafana
98
98
99
-
Grafana is an open-source visualization tools that allows to query, visualize, alert on, and visualize metrics from mixed datasources in configurable dashboards for observability. This charms is shipped with its own Grafana dashboard and supports integration with the [Grafana Operator](https://charmhub.io/grafana-k8s) to simplify observability. Please follow [COS Monitoring](/how-to/monitoring-cos/enable-monitoring) setup.
99
+
Grafana is an open-source visualisation tools that allows to query, visualise, alert on, and visualise metrics from mixed data sources in configurable dashboards for observability. This charms is shipped with its own Grafana dashboard and supports integration with the [Grafana Operator](https://charmhub.io/grafana-k8s) to simplify observability. Please follow [COS Monitoring](/how-to/monitoring-cos/enable-monitoring) setup.
100
100
101
101
### Loki
102
102
@@ -108,33 +108,32 @@ Prometheus is an open-source systems monitoring and alerting toolkit with a dime
108
108
109
109
## LLD (Low Level Design)
110
110
111
-
Please check the charm state machines displayed on [workflow diagrams](/explanation/flowcharts/charm). The low-level logic is mostly common for both VM and K8s charm flavors.
111
+
Please check the charm state machines displayed on [workflow diagrams](/explanation/flowcharts/charm). The low-level logic is mostly common for both VM and K8s charm flavours.
112
112
113
113
<!--- TODO: Describe all possible installations? Cross-model/controller? --->
114
114
115
-
### Juju Events
115
+
### Juju events
116
116
117
-
Accordingly to the [Juju SDK](https://juju.is/docs/sdk/event): “an event is a data structure that encapsulates part of the execution context of a charm”.
117
+
An eventis a data structure that encapsulates part of the execution context of a charm.
118
118
119
119
For this charm, the following events are observed:
120
120
121
-
1.[postgresql_pebble_ready](https://juju.is/docs/sdk/container-name-pebble-ready-event): informs charm about the availability of the rock "charmed-postgresql"-based `workload` K8s container. Also performs basic preparations to bootstrap the cluster on the first leader (or join the already configured cluster).
122
-
2.[leader-elected](https://juju.is/docs/sdk/leader-elected-event): generate all the secrets to bootstrap the cluster.
123
-
5.[config_changed](https://juju.is/docs/sdk/config-changed-event): usually fired in response to a configuration change using the GUI or CLI. Create and set default cluster and cluster-set names in the peer relation databag (on the leader only).
124
-
6.[update-status](https://juju.is/docs/sdk/update-status-event): Takes care of workload health checks.
121
+
1.[postgresql_pebble_ready](https://documentation.ubuntu.com/juju/3.6/reference/hook/#container-pebble-ready): informs charm about the availability of the rock "charmed-postgresql"-based `workload` K8s container. Also performs basic preparations to bootstrap the cluster on the first leader (or join the already configured cluster).
122
+
2.[leader-elected](https://documentation.ubuntu.com/juju/3.6/reference/hook/#leader-elected): generate all the secrets to bootstrap the cluster.
123
+
5.[config_changed](https://documentation.ubuntu.com/juju/3.6/reference/hook/#config-changed): usually fired in response to a configuration change using the GUI or CLI. Create and set default cluster and cluster-set names in the peer relation databag (on the leader only).
124
+
6.[update-status](https://documentation.ubuntu.com/juju/3.6/reference/hook/#update-status): Takes care of workload health checks.
8. TODO: any other events? relation_joined/changed/created/broken
126
+
1. TODO: any other events? relation_joined/changed/created/broken
127
127
--->
128
128
129
129
### Charm Code Overview
130
130
131
131
The "[src/charm.py](https://github.com/canonical/postgresql-k8s-operator/blob/main/src/charm.py)" is the default entry point for a charm and has the `PostgresqlOperatorCharm` Python class which inherits from CharmBase.
132
132
133
-
CharmBase is the base class from which all Charms are formed, defined by [Ops](https://juju.is/docs/sdk/ops) (Python framework for developing charms). See more information in [Charm](https://juju.is/docs/sdk/constructs#charm).
134
-
133
+
CharmBase is the base class from which all Charms are formed, defined by [Ops](https://ops.readthedocs.io/en/latest/index.html) (Python framework for developing charms).
135
134
The `__init__` method guarantees that the charm observes all events relevant to its operation and handles them.
136
135
137
-
The VM and K8s charm flavors shares the codebase via [charm libraries](https://juju.is/docs/sdk/libraries) in [lib/charms/postgresql_k8s/v0/](https://github.com/canonical/postgresql-k8s-operator/blob/main/lib/charms/postgresql_k8s/v0/postgresql.py) (of K8s flavor of the charm!):
136
+
The VM and K8s charm flavours shares the codebase via charm libraries in [lib/charms/postgresql_k8s/v0/](https://github.com/canonical/postgresql-k8s-operator/blob/main/lib/charms/postgresql_k8s/v0/postgresql.py) (of K8s flavour of the charm!):
Copy file name to clipboardExpand all lines: docs/explanation/connection-pooling.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,7 +8,7 @@ A way to achieve this with Charmed PostgreSQL K8s is by integrating with the [Pg
8
8
9
9
## Increasing maximum allowed connections
10
10
11
-
If using PgBouncer is not enough to handle the connections load of your application, you can increase the amount of connections that PostgreSQL can open via the [`experimental_max_connections`config parameter](https://charmhub.io/postgresql-k8s/configurations#experimental_max_connections).
11
+
If using PgBouncer is not enough to handle the connections load of your application, you can increase the amount of connections that PostgreSQL can open via the [`experimental_max_connections`configuration parameter](https://charmhub.io/postgresql-k8s/configurations#experimental_max_connections).
12
12
13
13
```{caution}
14
14
Each connection opened by PostgreSQL spawns a new process, which is resource-intensive. Use this option as a last resort.
Copy file name to clipboardExpand all lines: docs/explanation/flowcharts/relations.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
# Relations flowcharts
2
2
3
-
This reference documentation details the implementation of the `database-peers` peer relation. This is the peer relation for PostgreSQL, used to share user and config information from the leader unit to the follower units. The file implementing these relations can be found here: [src/relations/charm.py](https://github.com/canonical/postgresql-k8s-operator/blob/main/src/charm.py) (it should be moved to a file called `src/relations/peers.py` in the future).
3
+
This reference documentation details the implementation of the `database-peers` peer relation. This is the peer relation for PostgreSQL, used to share user and configuration information from the leader unit to the follower units. The file implementing these relations can be found here: [src/relations/charm.py](https://github.com/canonical/postgresql-k8s-operator/blob/main/src/charm.py) (it should be moved to a file called `src/relations/peers.py` in the future).
Copy file name to clipboardExpand all lines: docs/explanation/juju.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
3
3
[Juju](https://juju.is/) is an open source orchestration engine for software operators that enables the deployment, integration and lifecycle management of applications at any scale, on any infrastructure using charms.
4
4
5
-
> See also: [Juju client documentation](https://juju.is/docs/juju), [Juju blog](https://ubuntu.com/blog/tag/juju)
5
+
> See also: {{juju_documentation_url}}, [Juju blog](https://ubuntu.com/blog/tag/juju)
6
6
7
7
## Compatibility with PostgreSQL
8
8
@@ -26,7 +26,7 @@ In the context of this documentation, the pertinent changes are as follows:
26
26
|`run`|`exec`|
27
27
|`run-action --wait`|`run`|
28
28
29
-
See the [Juju 3.0 release notes](https://juju.is/docs/juju/roadmap#juju-3-0-0---22-oct-2022) for the comprehensive list of changes.
29
+
See the [Juju 3.0 release notes](https://juju.is/docs/juju/roadmap) for the comprehensive list of changes.
0 commit comments