Skip to content

Commit 6f4fb8c

Browse files
committed
Fix a bunch of typos and incorrect docs
Signed-off-by: Philippe Noël <philippemnoel@gmail.com>
1 parent 3c56d04 commit 6f4fb8c

17 files changed

+51
-52
lines changed

.github/actions/deploy-cluster/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ runs:
1313
env:
1414
NAMESPACE: ${{ inputs.namespace }}
1515
run: |
16-
cat <<EOF | kubectl apply -f -
16+
cat <<EOF | kubectl apply --server-side --validate=strict -f -
1717
# Example of PostgreSQL cluster
1818
apiVersion: postgresql.cnpg.io/v1
1919
kind: Cluster

.github/actions/deploy-operator/action.yml

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,12 @@ runs:
1717
env:
1818
NAMESPACE: ${{ inputs.namespace }}
1919
CLUSTER_WIDE: ${{ inputs.cluster-wide }}
20-
run:
21-
helm dependency update charts/cloudnative-pg
22-
23-
helm upgrade
24-
--install
25-
--namespace $NAMESPACE
26-
--create-namespace
27-
--set config.clusterWide=$CLUSTER_WIDE
28-
--wait
29-
cnpg charts/cloudnative-pg
20+
run: |
21+
helm repo add cnpg https://cloudnative-pg.github.io/charts
22+
helm upgrade \
23+
--install \
24+
--namespace $NAMESPACE \
25+
--create-namespace \
26+
--set config.clusterWide=$CLUSTER_WIDE \
27+
--wait \
28+
cnpg cnpg/cloudnative-pg

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,11 @@ charts/**/charts/*.tgz
1616
# Output of the go coverage tool, specifically when used with LiteIDE
1717
*.out
1818

19-
# editor and IDE paraphernalia
19+
# Editor and IDE paraphernalia
2020
.idea
2121
*.swp
2222
*.swo
2323
*~
24+
25+
# macOS
26+
.DS_Store

LICENSE

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
Apache License
32
Version 2.0, January 2004
43
http://www.apache.org/licenses/

charts/cluster/README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ Depending on the type the chart will use a different Docker image and fill in so
6868

6969
The chart has three modes of operation. These are configured via the `mode` parameter:
7070
* `standalone` - Creates new or updates an existing CNPG cluster. This is the default mode.
71-
* `replica` - Creates a replica cluster from an existing CNPG cluster. **_Note_ that this mode is not yet supported.**
71+
* `replica` - Creates a replica cluster from an existing CNPG cluster.
7272
* `recovery` - Recovers a CNPG cluster from a backup, object store or via pg_basebackup.
7373

7474
### Backup configuration
@@ -93,9 +93,9 @@ backups:
9393
backupOwnerReference: self
9494
```
9595
96-
Each backup adapter takes it's own set of parameters, listed in the [Configuration options](#Configuration-options) section
97-
below. Refer to the table for the full list of parameters and place the configuration under the appropriate key: `backup.s3`,
98-
`backup.azure`, or `backup.google`.
96+
Each backup adapter takes it's own set of parameters, listed in the [Configuration options](#Configuration-options)
97+
section. Refer to the table for the full list of parameters and place the configuration under the appropriate key: `backups.s3`,
98+
`backups.azure`, or `backups.google`.
9999

100100
Recovery
101101
--------
@@ -106,7 +106,7 @@ Examples
106106
--------
107107

108108
There are several configuration examples in the [examples](examples) directory. Refer to them for a basic setup and
109-
refer to the [CloudNativePG Documentation](https://cloudnative-pg.io/documentation/current/) for more advanced configurations.
109+
refer to the [CloudNativePG Documentation](https://cloudnative-pg.io/documentation/current/) for more advanced configurations.
110110

111111
## Values
112112

charts/cluster/README.md.gotmpl

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ Depending on the type the chart will use a different Docker image and fill in so
7676

7777
The chart has three modes of operation. These are configured via the `mode` parameter:
7878
* `standalone` - Creates new or updates an existing CNPG cluster. This is the default mode.
79-
* `replica` - Creates a replica cluster from an existing CNPG cluster. **_Note_ that this mode is not yet supported.**
79+
* `replica` - Creates a replica cluster from an existing CNPG cluster.
8080
* `recovery` - Recovers a CNPG cluster from a backup, object store or via pg_basebackup.
8181

8282
### Backup configuration
@@ -101,9 +101,9 @@ backups:
101101
backupOwnerReference: self
102102
```
103103

104-
Each backup adapter takes it's own set of parameters, listed in the [Configuration options](#Configuration-options) section
105-
below. Refer to the table for the full list of parameters and place the configuration under the appropriate key: `backup.s3`,
106-
`backup.azure`, or `backup.google`.
104+
Each backup adapter takes it's own set of parameters, listed in the [Configuration options](#Configuration-options)
105+
section. Refer to the table for the full list of parameters and place the configuration under the appropriate key: `backups.s3`,
106+
`backups.azure`, or `backups.google`.
107107

108108

109109
Recovery
@@ -116,7 +116,7 @@ Examples
116116
--------
117117

118118
There are several configuration examples in the [examples](examples) directory. Refer to them for a basic setup and
119-
refer to the [CloudNativePG Documentation](https://cloudnative-pg.io/documentation/current/) for more advanced configurations.
119+
refer to the [CloudNativePG Documentation](https://cloudnative-pg.io/documentation/current/) for more advanced configurations.
120120

121121

122122
{{ template "chart.requirementsSection" . }}

charts/cluster/docs/Getting Started.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@ The CNPG cluster chart follows a convention over configuration approach. This me
44
CNPG setup with sensible defaults. However, you can override these defaults to create a more customized setup. Note that
55
you still need to configure backups and monitoring separately. The chart will not install a Prometheus stack for you.
66

7-
_**Note,**_ that this is an opinionated chart. It does not support all configuration options that CNPG supports. If you
7+
_**Note**_ that this is an opinionated chart. It does not support all configuration options that CNPG supports. If you
88
need a highly customized setup, you should manage your cluster via a Kubernetes CNPG cluster manifest instead of this chart.
99
Refer to the [CNPG documentation](https://cloudnative-pg.io/documentation/current/) in that case.
1010

1111
## Installing the operator
1212

13-
To begin, make sure you install the CNPG operator in you cluster. It can be installed via a Helm chart as shown below or
14-
ir can be installed via a Kubernetes manifest. For more information see the [CNPG documentation](https://cloudnative-pg.io/documentation/current/installation_upgrade/).
13+
To begin, make sure you install the CNPG operator in your cluster. It can be installed via a Helm chart as shown below or
14+
it can be installed via a Kubernetes manifest. For more information see the [CNPG documentation](https://cloudnative-pg.io/documentation/current/installation_upgrade/).
1515

1616
```console
1717
helm repo add cnpg https://cloudnative-pg.github.io/charts
@@ -39,12 +39,12 @@ Depending on the type the chart will use a different Docker image and fill in so
3939
The chart has three modes of operation. These are configured via the `mode` parameter. If this is your first cluster, you
4040
are likely looking for the `standalone` option.
4141
* `standalone` - Creates new or updates an existing CNPG cluster. This is the default mode.
42-
* `replica` - Creates a replica cluster from an existing CNPG cluster. **_Note_ that this mode is not yet supported.**
42+
* `replica` - Creates a replica cluster from an existing CNPG cluster.
4343
* `recovery` - Recovers a CNPG cluster from a backup, object store or via pg_basebackup.
4444

4545
### Backup configuration
4646

47-
Most importantly you should configure your backup storage.
47+
Most importantly you should configure your backup storage.
4848

4949
CNPG implements disaster recovery via [Barman](https://pgbarman.org/). The following section configures the barman object
5050
store where backups will be stored. Barman performs backups of the cluster filesystem base backup and WALs. Both are
@@ -66,22 +66,22 @@ Additionally you can specify the following parameters:
6666
backupOwnerReference: self
6767
```
6868
69-
Each backup adapter takes it's own set of parameters, listed in the [Configuration options](../README.md#Configuration-options) section
70-
below. Refer to the table for the full list of parameters and place the configuration under the appropriate key: `backup.s3`,
71-
`backup.azure`, or `backup.google`.
69+
Each backup adapter takes it's own set of parameters, listed in the [Configuration options](../README.md#Configuration-options)
70+
section. Refer to the table for the full list of parameters and place the configuration under the appropriate key: `backups.s3`,
71+
`backups.azure`, or `backups.google`.
7272

7373
### Cluster configuration
7474

7575
There are several important cluster options. Here are the most important ones:
7676

7777
`cluster.instances` - The number of instances in the cluster. Defaults to `1`, but you should set this to `3` for production.
7878
`cluster.imageName` - This allows you to override the Docker image used for the cluster. The chart will choose a default
79-
for you based on the setting you chose for `type`. If you need to run a configuration that is not supported, you can
79+
for you based on the setting you chose for `type`. If you need to run a configuration that is not supported, you can
8080
create your own Docker image. You can use the [postgres-containers](https://github.com/cloudnative-pg/postgres-containers)
8181
repository for a starting point.
8282
You will likely need to set your own repository access credentials via: `cluster.imagePullPolicy` and `cluster.imagePullSecrets`.
8383
`cluster.storage.size` - The size of the persistent volume claim for the cluster. Defaults to `8Gi`. Every instance will
84-
have it's own persistent volume claim.
84+
have its own persistent volume claim.
8585
`cluster.storage.storageClass` - The storage class to use for the persistent volume claim.
8686
`cluster.resources` - The resource limits and requests for the cluster. You are strongly advised to use the same values
8787
for both limits and requests to ensure a [Guaranteed QoS](https://kubernetes.io/docs/concepts/workloads/pods/pod-qos/#guaranteed).
@@ -93,7 +93,7 @@ There are several important cluster options. Here are the most important ones:
9393
cluster:
9494
postgresql:
9595
max_connections: "200"
96-
shared_buffers: "2GB"
96+
shared_buffers: "2GB"
9797
```
9898
`cluster.initSQL` - Allows you to run custom SQL queries during the cluster initialization. This is useful for creating
9999
extensions, schemas and databases. Note that these are as a superuser.
@@ -103,4 +103,4 @@ For a full list - refer to the Helm chart [configuration options](../README.md#C
103103
## Examples
104104

105105
There are several configuration examples in the [examples](../examples) directory. Refer to them for a basic setup and
106-
refer to the [CloudNativePG Documentation](https://cloudnative-pg.io/documentation/current/) for more advanced configurations.
106+
refer to the [CloudNativePG Documentation](https://cloudnative-pg.io/documentation/current/) for more advanced configurations.

charts/cluster/docs/Recovery.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ When performing a recovery you are strongly advised to use the same configuratio
1616

1717
To begin, create a `values.yaml` that contains the following:
1818

19-
1. Set `mode: recovery` to indicate that you want to perform bootstrap the new cluster from an existing one.
19+
1. Set `mode: recovery` to indicate that you want to bootstrap the new cluster from an existing one.
2020
2. Set the `recovery.method` to the type of recovery you want to perform.
21-
3. Set either the `recovery.backupName` or the Barman Object Store configuration - i.e. `recovery.provider` and appropriate S3, Azure or GCS configuration. In case of `pg_basebackup` complete the `recovery.pgBaseBackup` section.
21+
3. Set either the `recovery.backupName` or the Barman Object Store configuration - i.e. `recovery.provider` and appropriate S3, Azure or GCS configuration. In case of `pg_basebackup` complete the `recovery.pgBaseBackup` section.
2222
4. Optionally set the `recovery.pitrTarget.time` in RFC3339 format to perform a point-in-time recovery (not applicable for `pgBaseBackup`).
2323
5. Retain the identical PostgreSQL version and configuration as the original cluster.
2424
6. Make sure you don't use the same backup section name as the original cluster. We advise you change the `path` within the storage location if you want to reuse the same storage location/bucket.

charts/cluster/docs/runbooks/CNPGClusterHighPhysicalReplicationLagWarning.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ The `CNPGClusterHighPhysicalReplicationLagWarning` alert is triggered when physi
66

77
## Impact
88

9-
High physical replication lag can cause the cluster replicas to become out of sync. Queries to the `-r` and `-ro` endpoints may return stale data. In the event of a failover, the data that has not yet been replicated from the primary to the replicas may be lost during failover..
9+
High physical replication lag can cause the cluster replicas to become out of sync. Queries to the `-r` and `-ro` endpoints may return stale data. In the event of a failover, the data that has not yet been replicated from the primary to the replicas may be lost during failover.
1010

1111
## Diagnosis
1212

@@ -34,7 +34,7 @@ Inspect the disk IO statistics using the [CloudNativePG Grafana Dashboard](https
3434

3535
Inspect the `Stat Activity` section of the [CloudNativePG Grafana Dashboard](https://grafana.com/grafana/dashboards/20417-cloudnativepg/).
3636

37-
- Suboptimal PostgreSQL configuration, e.g. too `few max_wal_senders`. Set this to at least the number of cluster instances (default 10 is usually sufficient).
37+
- Suboptimal PostgreSQL configuration, e.g. too few `max_wal_senders`. Set this to at least the number of cluster instances (default 10 is usually sufficient).
3838

3939
Inspect the `PostgreSQL Parameters` section of the [CloudNativePG Grafana Dashboard](https://grafana.com/grafana/dashboards/20417-cloudnativepg/).
4040

charts/cluster/docs/runbooks/CNPGClusterPhysicalReplicationLag.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ SHOW max_replication_slots;
175175

176176
```bash
177177
# Check replication status
178-
kubectl exec -n <namespace> services/<cluster_name>-w -- psql -c "SELECT * FROM pg_stat_replication;"
178+
kubectl exec -n <namespace> services/<cluster_name>-rw -- psql -c "SELECT * FROM pg_stat_replication;"
179179
180180
# Check resource usage
181181
kubectl top pods -n <namespace> -l cnpg.io/podRole=instance

0 commit comments

Comments
 (0)