Skip to content

Commit 6933786

Browse files
authored
Fix automatic doc checks (#1006)
* Fix spellcheck * Fix some broken URLs * fix remaining broken urls * add missing backticks to toctrees * small spellcheck fix
1 parent fe2c9fb commit 6933786

Some content is hidden

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

58 files changed

+286
-201
lines changed

docs/.custom_wordlist.txt

Lines changed: 112 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,152 @@
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+
backport
16+
balancer
17+
balancers
18+
benchmark
19+
benchmarking
20+
CharmBase
421
Charmcraft
22+
charmhub
23+
checksum
24+
checksums
25+
CIS
526
cjk
27+
codebase
28+
config
29+
configs
630
cryptographically
31+
CSR
32+
CSRs
33+
databag
34+
databags
35+
dev
736
dvipng
37+
eks
38+
EKS
39+
entrypoint
40+
failover
41+
filesystem
42+
filesystems
843
fonts
944
freefont
45+
gapped
46+
gce
47+
GCE
48+
gcloud
49+
GCloud
50+
GCP
1051
github
52+
GLAuth
1153
GPG
1254
gyre
55+
HLD
56+
hostname
57+
hostnames
1358
https
59+
IAAS
60+
integration
61+
integrations
1462
Intersphinx
63+
io
64+
IPs
65+
IPv
66+
Jira
67+
jitter
68+
Juju
69+
Juju's
1570
lang
1671
LaTeX
1772
latexmk
73+
LDAP
74+
libs
75+
lifecycle
76+
LXD
77+
LXD's
78+
MicroK8s
79+
MinIO
1880
Multipass
81+
nameserver
82+
nameservers
83+
Nextcloud
1984
otf
85+
Parca
86+
Parca's
87+
Patroni
88+
patronictl
89+
pgbackrest
90+
pgBackRest
91+
pgbouncer
92+
pgsql
93+
PITR
2094
plantuml
2195
PNG
96+
pooler
97+
postgres
98+
postgresql
99+
PPA
100+
PPAs
101+
pqsql
102+
programmatically
103+
PSC
104+
PVCs
105+
py
22106
Pygments
23107
QEMU
108+
RadosGW
109+
requirer
110+
rockcraft
24111
Rockcraft
112+
routable
25113
rst
114+
scalable
115+
sdk
116+
SHA
117+
snap
118+
snapcraft
119+
SoS
120+
squashfs
121+
SquashFS
122+
src
123+
SSL
124+
stateful
26125
SVG
126+
Sysbench
127+
terraform
27128
tex
28129
texlive
130+
TimescaleDB
29131
TOC
30132
toctree
133+
Traefik
31134
txt
135+
ubuntu
32136
uncommenting
137+
uncordon
33138
utils
139+
vm
34140
VMs
141+
WAL
142+
walkthrough
35143
WCAG
144+
wget
36145
whitespace
37146
whitespaces
147+
WIP
38148
wordlist
39149
xetex
150+
XID
40151
xindy
152+
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: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,8 @@
208208
linkcheck_ignore = [
209209
"http://127.0.0.1:8000",
210210
"https://github.com/canonical/ACME/*",
211-
"https://matrix.to/*"
211+
"https://matrix.to/*",
212+
"https://portal.azure.com/#browse/Microsoft.Compute/VirtualMachines"
212213
]
213214

214215
# A regex list of URLs where anchors are ignored by 'make linkcheck'

docs/explanation/architecture.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ GLAuth is a secure, easy-to-use and open-sourced LDAP server which provides capa
8383

8484
### Grafana
8585

86-
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.
86+
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.
8787

8888
### Loki
8989

@@ -105,25 +105,25 @@ Accordingly to the [Juju SDK](https://juju.is/docs/sdk/event): “an event is a
105105

106106
For this charm, the following events are observed:
107107

108-
1. [`on_install`](https://juju.is/docs/sdk/install-event): install the snap "charmed-postgresql" and perform basic preparations to bootstrap the cluster on the first leader (or join the already configured cluster).
109-
2. [`leader-elected`](https://juju.is/docs/sdk/leader-elected-event): generate all the secrets to bootstrap the cluster.
110-
3. [`leader-settings-changed`](https://juju.is/docs/sdk/leader-settings-changed-event): Handle the leader settings changed event.
111-
4. [`start`](https://juju.is/docs/sdk/start-event): Init/setting up the cluster node.
112-
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).
113-
6. [`update-status`](https://juju.is/docs/sdk/update-status-event): Takes care of workload health checks.
108+
1. [`on_install`](https://documentation.ubuntu.com/juju/3.6/reference/hook/#install): install the snap "charmed-postgresql" and perform basic preparations to bootstrap the cluster on the first leader (or join the already configured cluster).
109+
2. [`leader-elected`](https://documentation.ubuntu.com/juju/3.6/reference/hook/#leader-elected): generate all the secrets to bootstrap the cluster.
110+
3. [`leader-settings-changed`](https://documentation.ubuntu.com/juju/3.6/reference/hook/#leader-settings-changed): Handle the leader settings changed event.
111+
4. [`start`](https://documentation.ubuntu.com/juju/3.6/reference/hook/#start): Init/setting up the cluster node.
112+
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).
113+
6. [`update-status`](https://documentation.ubuntu.com/juju/3.6/reference/hook/#update-status): Takes care of workload health checks.
114114
<!--- 7. database_storage_detaching: TODO: ops? event?
115-
8. TODO: any other events?
115+
1. TODO: any other events?
116116
--->
117117

118118
### Charm code overview
119119

120-
[`src/charm.py`](https://github.com/canonical/postgresql-operator/blob/main/src/charm.py) is the default entry point for a charm and has the `PostgresqlOperatorCharm` Python class which inherits from CharmBase.
120+
[`src/charm.py`](https://github.com/canonical/postgresql-operator/blob/main/src/charm.py) is the default entry point for a charm and has the `PostgresqlOperatorCharm` Python class which inherits from `CharmBase`.
121121

122-
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).
122+
`CharmBase` is the base class from which all Charms are formed, defined by [Ops](https://ops.readthedocs.io/en/latest/) (Python framework for developing charms). See more information in the [Ops documentation for `CharmBase`](https://ops.readthedocs.io/en/latest/reference/ops.html#ops.CharmBase).
123123

124124
The `__init__` method guarantees that the charm observes all events relevant to its operation and handles them.
125125

126-
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!):
126+
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!):
127127
```text
128128
> charmcraft list-lib postgresql-k8s
129129
Library name API Patch

docs/explanation/index.md

Lines changed: 15 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -3,51 +3,32 @@
33
Additional context about key concepts behind the PostgreSQL charm, including design and legacy information.
44

55
## Core concepts and design
6-
* [Architecture]
7-
* [Interfaces and endpoints]
8-
* [Juju]
9-
* [Legacy charm]
10-
11-
## Operational concepts
12-
* [Units]
13-
* [Users]
14-
* [Roles]
15-
* [Logs]
16-
* [Connection pooling]
17-
18-
## Security and hardening
19-
* [Security hardening guide][Security]
20-
* [Cryptography]
21-
22-
23-
<!-- Links -->
24-
25-
[Architecture]: /explanation/architecture
26-
[Interfaces and endpoints]: /explanation/interfaces-and-endpoints
27-
[Units]: /explanation/units
28-
[Users]: /explanation/users
29-
[Roles]: /explanation/roles
30-
[Logs]: /explanation/logs
31-
[Juju]: /explanation/juju
32-
[Legacy charm]: /explanation/legacy-charm
33-
[Connection pooling]: /explanation/connection-pooling
34-
[Security]: /explanation/security/index
35-
[Cryptography]: /explanation/security/cryptography
36-
376

387
```{toctree}
398
:titlesonly:
40-
:maxdepth: 2
41-
:glob:
42-
:hidden:
439
4410
Architecture <architecture>
4511
Interfaces and endpoints <interfaces-and-endpoints>
4612
Juju <juju>
4713
Legacy charm <legacy-charm>
14+
```
15+
16+
## Operational concepts
17+
18+
```{toctree}
19+
:titlesonly:
20+
4821
Units <units>
4922
Users <users>
5023
Roles <roles>
5124
Logs <logs>
5225
Connection pooling <connection-pooling>
26+
```
27+
28+
## Security and hardening
29+
30+
```{toctree}
31+
:titlesonly:
32+
5333
Security <security/index>
34+
```

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: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
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`:
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`:
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

88
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

@@ -35,7 +35,7 @@ The "modern" charm provides temporary support for the legacy interfaces:
3535
3636
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.
3737
38-
Please [contact us](https://chat.charmhub.io/charmhub/channels/data-platform) if you need migration instructions.
38+
Please [contact us](/reference/contacts) if you need migration instructions.
3939
```
4040

4141
## How to deploy old "legacy" PostgreSQL charm
@@ -60,7 +60,7 @@ A common error message is: `cannot deploy application "postgresql": unknown opti
6060

6161
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.
6262

63-
Feel free to [contact us](https://chat.charmhub.io/charmhub/channels/data-platform) about the DB tuning/config options.
63+
Feel free to [contact us](/reference/contacts) about the DB tuning/config options.
6464

6565
## Extensions supported by modern charm
6666

@@ -80,7 +80,7 @@ For more information about migrating the new interface, see [this guide](/how-to
8080

8181
At the moment, the modern charms support PostgreSQL 14 (based on Jammy/22.04 series) only.
8282

83-
Please [contact us](https://chat.charmhub.io/charmhub/channels/data-platform) if you need different versions/series.
83+
Please [contact us](/reference/contacts) if you need different versions/series.
8484

8585
## Supported architectures
8686

docs/explanation/logs.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,5 +98,5 @@ Charmed PostgreSQL is configured to rotate PostgreSQL text logs every minute and
9898

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

101-
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.
101+
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.
102102

docs/explanation/security/cryptography.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ Charmed PostgreSQL can be used to deploy a secure PostgreSQL cluster that provid
3030
* PgBouncer connections
3131
* External clients connections
3232

33-
To set up a secure connection Charmed PostgreSQL and Charmed PgBouncer need to be integrated with TLS Certificate Provider charms, e.g. self-signed-certificates operator. Certificate Signing Requests (CSRs) are generated for every unit using the tls_certificates_interface library that uses the cryptography Python library to create X.509 compatible certificates. The CSR is signed by the TLS Certificate Provider, returned to the units, and stored in Juju secret. The relation also provides the CA certificate, which is loaded into Juju secret.
33+
To set up a secure connection Charmed PostgreSQL and Charmed PgBouncer need to be integrated with TLS Certificate Provider charms, e.g. self-signed-certificates operator. Certificate Signing Requests (CSRs) are generated for every unit using the `tls_certificates_interface` library that uses the cryptography Python library to create X.509 compatible certificates. The CSR is signed by the TLS Certificate Provider, returned to the units, and stored in Juju secret. The relation also provides the CA certificate, which is loaded into Juju secret.
3434

3535
Encryption at rest is currently not supported, although it can be provided by the substrate (cloud or on-premises).
3636

docs/explanation/security/index.md

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,22 +11,22 @@ The environment where Charmed PostgreSQL operates can be divided into two compon
1111

1212
### Cloud
1313

14-
Charmed PostgreSQL can be deployed on top of several clouds and virtualization layers:
14+
Charmed PostgreSQL can be deployed on top of several clouds and virtualisation layers:
1515

1616
|Cloud|Security guides|
1717
| --- | --- |
1818
|OpenStack|[OpenStack Security Guide](https://docs.openstack.org/security-guide/)|
19-
|AWS|[Best Practices for Security, Identity and Compliance](https://aws.amazon.com/architecture/security-identity-compliance), [AWS security credentials](https://docs.aws.amazon.com/IAM/latest/UserGuide/security-creds.html#access-keys-and-secret-access-keys)|
19+
|AWS|[Best Practices for Security, Identity and Compliance](https://aws.amazon.com/architecture/security-identity-compliance), [AWS security credentials](https://docs.aws.amazon.com/IAM/latest/UserGuide/security-creds.html)|
2020
|Azure|[Azure security best practices and patterns](https://learn.microsoft.com/en-us/azure/security/fundamentals/best-practices-and-patterns), [Managed identities for Azure resource](https://learn.microsoft.com/en-us/entra/identity/managed-identities-azure-resources/)|
2121
|GCP|[Google security overview](https://cloud.google.com/docs/security)|
2222

2323
### Juju
2424

25-
Juju is the component responsible for orchestrating the entire lifecycle, from deployment to Day 2 operations. For more information on Juju security hardening, see the [Juju security page](https://canonical-juju.readthedocs-hosted.com/en/latest/user/explanation/juju-security/) and the [How to harden your deployment](https://juju.is/docs/juju/harden-your-deployment) guide.
25+
Juju is the component responsible for orchestrating the entire lifecycle, from deployment to Day 2 operations. For more information on Juju security hardening, see the [Juju security page](https://canonical-juju.readthedocs-hosted.com/en/latest/user/explanation/juju-security/) and the [How to harden your deployment](https://documentation.ubuntu.com/juju/latest/howto/manage-your-deployment/#harden-your-deployment) guide.
2626

2727
#### Cloud credentials
2828

29-
When configuring cloud credentials to be used with Juju, ensure that users have correct permissions to operate at the required level. Juju superusers responsible for bootstrapping and managing controllers require elevated permissions to manage several kinds of resources, such as virtual machines, networks, storages, etc. Please refer to the links below for more information on the policies required to be used depending on the cloud.
29+
When configuring cloud credentials to be used with Juju, ensure that users have correct permissions to operate at the required level. Juju superusers responsible for bootstrapping and managing controllers require elevated permissions to manage several kinds of resources, such as virtual machines, networks, storage, etc. Please refer to the links below for more information on the policies required to be used depending on the cloud.
3030

3131
|Cloud|Cloud user policies|
3232
| --- | --- |
@@ -39,7 +39,7 @@ When configuring cloud credentials to be used with Juju, ensure that users have
3939

4040
It is very important that Juju users are set up with minimal permissions depending on the scope of their operations. Please refer to the [User access levels](https://juju.is/docs/juju/user-permissions) documentation for more information on the access levels and corresponding abilities.
4141

42-
Juju user credentials must be stored securely and rotated regularly to limit the chances of unauthorized access due to credentials leakage.
42+
Juju user credentials must be stored securely and rotated regularly to limit the chances of unauthorised access due to credentials leakage.
4343

4444
## Applications
4545

@@ -93,9 +93,5 @@ For details on the cryptography used by Charmed PostgreSQL, see the [Cryptograph
9393

9494

9595
```{toctree}
96-
:titlesonly:
97-
:maxdepth: 2
98-
:glob:
99-
:hidden:
100-
10196
Cryptography <cryptography>
97+
```

0 commit comments

Comments
 (0)