Skip to content

Commit 2a6bd13

Browse files
Fix automatic doc checks (#1016)
* fix spellcheck errors and false positives * fix broken ULRs * fix remaining broken URLs * replace leftover mentions of 14/stable with 16/edge * add newline to custom wordlist file * fix incorrect VM mentions * fix typo Co-authored-by: Carl Csaposs <[email protected]> --------- Co-authored-by: Carl Csaposs <[email protected]>
1 parent fe14244 commit 2a6bd13

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+229
-140
lines changed

docs/.custom_wordlist.txt

Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,140 @@
11
# Leave a blank line at the end of this file to support concatenation
2+
airgap
3+
airgapped
4+
analyze
5+
artifact
6+
Artifactory
7+
artifacts
8+
async
9+
aws
10+
AWS
11+
AZ
12+
AZs
213
backend
314
backends
15+
balancer
16+
balancers
17+
benchmark
18+
benchmarking
19+
CharmBase
420
Charmcraft
21+
charmhub
22+
checksum
23+
checksums
24+
CIS
525
cjk
26+
codebase
27+
config
28+
configs
629
cryptographically
30+
CSR
31+
CSRs
32+
databag
33+
databags
34+
dev
735
dvipng
36+
eks
37+
EKS
38+
entrypoint
39+
failover
40+
filesystem
41+
filesystems
842
fonts
943
freefont
44+
gapped
45+
gce
46+
GCE
47+
gcloud
48+
GCloud
49+
GCP
1050
github
51+
GLAuth
1152
GPG
1253
gyre
54+
HLD
55+
hostname
56+
hostnames
1357
https
58+
IAAS
59+
integration
60+
integrations
1461
Intersphinx
62+
io
63+
IPv
64+
Jira
65+
jitter
66+
Juju
67+
Juju's
1568
lang
1669
LaTeX
1770
latexmk
71+
LDAP
72+
libs
73+
lifecycle
74+
MicroK8s
75+
MinIO
1876
Multipass
77+
nameserver
78+
nameservers
79+
Nextcloud
1980
otf
81+
Parca
82+
Patroni
83+
Patroni*
84+
pgbackrest
85+
pgBackRest
86+
pgbouncer
87+
Pgbouncer*
88+
pgsql
89+
PITR
2090
plantuml
2191
PNG
92+
pooler
93+
postgres
94+
postgresql
95+
PPA
96+
PPAs
97+
pqsql
98+
programmatically
99+
PVCs
100+
py
22101
Pygments
23102
QEMU
103+
RadosGW
104+
requirer
105+
rockcraft
24106
Rockcraft
25107
rst
108+
scalable
109+
sdk
110+
SHA
111+
snap
112+
snapcraft
113+
SquashFS
114+
src
115+
SSL
116+
stateful
26117
SVG
118+
Sysbench
119+
terraform
27120
tex
28121
texlive
29122
TOC
30123
toctree
31124
txt
125+
ubuntu
32126
uncommenting
127+
uncordon
33128
utils
129+
vm
34130
VMs
131+
WAL
132+
walkthrough
35133
WCAG
36134
whitespace
37135
whitespaces
38136
wordlist
39137
xetex
138+
XID
40139
xindy
140+
yaml

docs/.sphinx/spellingcheck.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ matrix:
99
- .custom_wordlist.txt
1010
output: .sphinx/.wordlist.dic
1111
sources:
12-
- _build/**/*.html
12+
- _build/**/*.html|!_build/reference/alert-rules/index.html
1313
pipeline:
1414
- pyspelling.filters.html:
1515
comments: false

docs/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@
207207

208208
linkcheck_ignore = [
209209
"http://127.0.0.1:8000",
210-
"https://github.com/canonical/ACME/*",
210+
"https://github.com/canonical/*",
211211
"https://matrix.to/*"
212212
]
213213

docs/explanation/architecture.md

Lines changed: 18 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
## Juju K8s concept
88

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.
1010

1111
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.
1212

@@ -28,23 +28,23 @@ And if you run `kubectl describe pod postgresql-k8s-0`, all the containers will
2828

2929
## HLD (High Level Design)
3030

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].
3232

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).
3434

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)...
3636

3737
The OCI/Rock ships the following components:
3838

3939
* PostgreSQL Community Edition (based on [`charmed-postgresql` snap])
4040
* Patroni (based on [`charmed-postgresql` snap])
4141
* PgBouncer (based on [`charmed-postgresql` snap])
42-
* pgBackRest (based on [`charmed-postgresql` snap])
42+
* PgBackRest (based on [`charmed-postgresql` snap])
4343
* Prometheus PostgreSQL Exporter (based on [`charmed-postgresql` snap])
4444
* Prometheus PgBouncer Exporter (based on [`charmed-postgresql` snap])
4545
* Prometheus Grafana dashboards and Loki alert rules are part of the charm revision (and missing in SNAP).
4646

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.
4848

4949
Pebble runs layers of all the currently enabled services, e.g. monitoring, backups, etc:
5050
```text
@@ -84,7 +84,7 @@ The rock "charmed-postgresql" also ships list of tools used by charm:
8484

8585
### Data Integrator
8686

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.
8888

8989
### PostgreSQL Test App
9090

@@ -96,7 +96,7 @@ GLAuth is a secure, easy-to-use and open-sourced LDAP server which provides capa
9696

9797
### Grafana
9898

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.
100100

101101
### Loki
102102

@@ -108,33 +108,32 @@ Prometheus is an open-source systems monitoring and alerting toolkit with a dime
108108

109109
## LLD (Low Level Design)
110110

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.
112112

113113
<!--- TODO: Describe all possible installations? Cross-model/controller? --->
114114

115-
### Juju Events
115+
### Juju events
116116

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 event is a data structure that encapsulates part of the execution context of a charm.
118118

119119
For this charm, the following events are observed:
120120

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.
125125
<!--- 7. database_storage_detaching: TODO: ops? event?
126-
8. TODO: any other events? relation_joined/changed/created/broken
126+
1. TODO: any other events? relation_joined/changed/created/broken
127127
--->
128128

129129
### Charm Code Overview
130130

131131
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.
132132

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).
135134
The `__init__` method guarantees that the charm observes all events relevant to its operation and handles them.
136135

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!):
138137
```
139138
> charmcraft list-lib postgresql-k8s
140139
Library name API Patch

docs/explanation/flowcharts/backups.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,6 @@ flowchart TD
7171
```
7272

7373
## On `list-backups` hook
74-
[Click to navigate the mermaid diagram on GitHub](https://github.com/canonical/postgresql-k8s-operator/blob/main/docs/explanation/e-backups.md).
7574

7675
```{mermaid}
7776
flowchart TD
@@ -85,7 +84,6 @@ flowchart TD
8584
```
8685

8786
## On `restore` hook
88-
[Click to navigate the mermaid diagram on GitHub](https://github.com/canonical/postgresql-k8s-operator/blob/main/docs/explanation/e-backups.md).
8987

9088
```{mermaid}
9189
flowchart TD

docs/explanation/interfaces-and-endpoints.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ Find all details about default and extra DB user roles in [](/explanation/users)
3939
```{note}
4040
Legacy relations are deprecated and will be discontinued on future releases. Their usage should be avoided.
4141
42-
Check the legacy interfaces implementation limitations in [](/explanation/legacy-charm)"
42+
Check the limitations of legacy interface implementations in [](/explanation/legacy-charm)
4343
```
4444

4545
### Legacy `pgsql` interface (`db` and `db-admin` endpoints):

docs/explanation/juju.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ In the context of this documentation, the pertinent changes are as follows:
2626
|`run`|`exec`|
2727
|`run-action --wait`|`run`|
2828

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://documentation.ubuntu.com/juju/3.6/reference/juju/juju-roadmap-and-releases/#juju-3-0-0-22-oct-2022) for the comprehensive list of changes.
3030

3131
Example substitutions:
3232

docs/explanation/legacy-charm.md

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
# Legacy charm
22

3-
There are [two types of charms](https://juju.is/docs/sdk/charm-taxonomy#charm-types-by-generation) stored under the same charm name `postgresql-k8s`:
3+
There are [two types of charms](https://documentation.ubuntu.com/juju/3.6/reference/charm/#by-generation) stored under the same charm name `postgresql-k8s`:
44

5-
1. [Reactive](https://juju.is/docs/sdk/charm-taxonomy#reactive) charm in the channel `latest/stable` (called `legacy`)
6-
2. [Ops-based](https://juju.is/docs/sdk/ops) charm in the channel `14/stable` (called `modern`)
5+
1. [Reactive](https://documentation.ubuntu.com/juju/3.6/reference/charm/#reactive) charm in the channel `latest/stable` (called `legacy`)
6+
2. [Ops-based](https://documentation.ubuntu.com/juju/3.6/reference/charm/#ops) charm in the channel `14/stable` (called `modern`)
77

8-
The legacy charm provided endpoints `db` and `db-admin` (for the interface `pgsql`). The modern charm provides old endpoints as well + new endpoint `database` (for the interface `postgresql_client`). Read more details about the available [endpoints/interfaces](https://charmhub.io/postgresql-k8s/docs/e-interfaces).
8+
The legacy charm provided endpoints `db` and `db-admin` (for the interface `pgsql`). The modern charm provides old endpoints as well + new endpoint `database` (for the interface `postgresql_client`). Read more details about the available [endpoints/interfaces](/explanation/interfaces-and-endpoints).
99

1010
```{note}
1111
Choose one endpoint to use, rather than relating both simultaneously.
@@ -39,7 +39,7 @@ Note that the `trust` option must be enabled if [Role Based Access Control (RBAC
3939
4040
Reactive charms cannot be upgraded to an operator-framework-based version. To move database data, the new DB application must be launched nearby, and data should be copied from "legacy" application to the "modern" one.
4141
42-
Please [contact us](https://chat.charmhub.io/charmhub/channels/data-platform) if you need migration instructions.
42+
Please [contact us](/reference/contacts) if you need migration instructions.
4343
```
4444

4545
## How to deploy old "legacy" postgresql charm
@@ -62,7 +62,7 @@ A common error message is: `cannot deploy application "postgresql": unknown opti
6262

6363
## Config options supported by modern charm
6464

65-
The legacy charm config options were not moved to the modern charm due to no need. The modern charm applies the best possible configuration automatically. Feel free to [contact us](https://chat.charmhub.io/charmhub/channels/data-platform) about the DB tuning/config options.
65+
The legacy charm configuration options were not moved to the modern charm due to no need. The modern charm applies the best possible configuration automatically. Feel free to [contact us](/reference/contacts) about the DB tuning/config options.
6666

6767
## Extensions supported by modern charm
6868

@@ -77,7 +77,7 @@ In the legacy charm, the user could request roles by setting the `roles` field t
7777
## Supported PostgreSQL versions by modern charm
7878

7979
At the moment, the modern charms support PostgreSQL 14 (based on Jammy/22.04 series) only.
80-
Please [contact us](https://chat.charmhub.io/charmhub/channels/data-platform) if you need different versions/series.
80+
Please [contact us](/reference/contacts) if you need different versions/series.
8181

8282
## Supported architectures: amd64, arm64, ...
8383
Currently, the charm supports architecture `amd64` (all revisions) and `arm64` (from revision 211+).
@@ -90,5 +90,4 @@ The "legacy charm" (from `latest/stable`) is stored on [Launchpad](https://git.l
9090

9191
The "modern charm" (from `14/stable`) is stored on [GitHub](https://github.com/canonical/postgresql-k8s-operator), here is the link to report [modern charm issues](https://github.com/canonical/postgresql-k8s-operator/issues/new/choose).
9292

93-
Do you have questions? [Contact us](https://chat.charmhub.io/charmhub/channels/data-platform)!
94-
93+
Do you have questions? [Contact us](/reference/contacts)!

docs/explanation/logs.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Logs
22

3-
This page summarizes all log types in Charmed PostgreSQL to simplify troubleshooting.
3+
This page summarises all log types in Charmed PostgreSQL to simplify troubleshooting.
44

55
For an overview of all charm components, see [](/explanation/architecture).
66

@@ -96,5 +96,5 @@ Charmed PostgreSQL is configured to rotate PostgreSQL text logs every minute and
9696

9797
For PostgreSQL, logs will be truncated when the week turns and the same minute of the same hour of the same weekday comes to pass. E.g. at 12:01 UTC on Monday either a new log file will be created or last week's log will be overwritten.
9898

99-
Due to Patroni only supporting size based rotation, it has been configured to retain logs for a comparatively similar timeframe as PostgreSQL. The assumed size of a minute of Patroni logs is 600 bytes, but the estimation is bound to be imprecise. Patroni will retain 10,080 log files (for every minute of a week). The current log is `patroni.log`, when rotating Patroni will append a number to the name of the file and remove logs over the limit.
99+
Due to Patroni only supporting size based rotation, it has been configured to retain logs for a comparatively similar time frame as PostgreSQL. The assumed size of a minute of Patroni logs is 600 bytes, but the estimation is bound to be imprecise. Patroni will retain 10,080 log files (for every minute of a week). The current log is `patroni.log`, when rotating Patroni will append a number to the name of the file and remove logs over the limit.
100100

0 commit comments

Comments
 (0)