Skip to content

Commit 7d3218a

Browse files
author
Jonathan S. Katz
committed
Documentation adjustments
1 parent 7736d0f commit 7d3218a

Some content is hidden

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

68 files changed

+413
-406
lines changed

hugo/content/Upgrade/_index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,4 +40,4 @@ In this example, we are upgrading a cluster from PostgreSQL 11.5 to 11.6 using t
4040

4141
`pgo upgrade mycluster --ccp-image-tag=centos7-11.6-4.2.0`
4242

43-
For more information, please see the `pgo upgrade` documentation [here.] ( {{< relref "pgo-cli/reference/pgo_upgrade.md" >}})
43+
For more information, please see the `pgo upgrade` documentation [here.] ( {{< relref "pgo-client/reference/pgo_upgrade.md" >}})

hugo/content/advanced/direct-api-calls.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ The API can also be accessed by interacting directly with the API server. This c
1111

1212
The most basic example of this interaction is getting the version of the API server. You can send a GET request to `$PGO_APISERVER_URL/version` and this will send back a json response including the API server version. This is important because the server version and the client version must match. If you are using `pgo` this means you must have the correct version of the client but with a direct call you can specify the client version as part of the request.
1313

14-
The API server is setup to work with the pgo command line interface so the parameters that are passed to the server can be found by looking at the related flags. For example, the series parameter used in the `create` example below is the same as the `-e, --series` flag that is described in the [pgo cli docs](https://access.crunchydata.com/documentation/postgres-operator/4.2.0/pgo-cli/reference/pgo_create_cluster/).
14+
The API server is setup to work with the pgo command line interface so the parameters that are passed to the server can be found by looking at the related flags. For example, the series parameter used in the `create` example below is the same as the `-e, --series` flag that is described in the [pgo cli docs](https://access.crunchydata.com/documentation/postgres-operator/4.2.0/pgo-client/reference/pgo_create_cluster/).
1515

1616
###### Get API Server Version
1717
```

hugo/content/architecture/disaster-recovery.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ The PostgreSQL Operator supports the ability to perform a full restore on a
8989
PostgreSQL cluster as well as a point-in-time-recovery using the `pgo restore`
9090
command. Note that both of these options are **destructive** to the existing
9191
PostgreSQL cluster; to "restore" the PostgreSQL cluster to a new deployment,
92-
please see the [Clone](/pgo-cli/common-tasks/#clone-a-postgresql-cluster) section.
92+
please see the [Clone](/pgo-client/common-tasks/#clone-a-postgresql-cluster) section.
9393

9494
The `pgo restore` command lets you specify the point at which you want to
9595
restore your database using the `--pitr-target` flag with the `pgo restore`

hugo/content/pgo-cli/reference/_index.md

Lines changed: 0 additions & 52 deletions
This file was deleted.

hugo/content/pgo-cli/reference/pgo_show.md

Lines changed: 0 additions & 63 deletions
This file was deleted.
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,5 +147,5 @@ one needs to perform when managing production PostgreSQL clusters. Beyond that
147147
is the full reference for all the available commands and flags for the `pgo`
148148
client.
149149

150-
- [Common `pgo` Client Tasks](/pgo-cli/common-tasks/)
151-
- [`pgo` Client Reference](/pgo-cli/common-reference/)
150+
- [Common `pgo` Client Tasks](/pgo-client/common-tasks/)
151+
- [`pgo` Client Reference](/pgo-client/common-reference/)
Lines changed: 35 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ draft: false
55
weight: 20
66
---
77

8-
While the full [`pgo` client reference](/pgo-cli/reference/) will tell you
8+
While the full [`pgo` client reference](/pgo-client/reference/) will tell you
99
everything you need to know about how to use `pgo`, it may be helpful to see
1010
several examples on how to conduct "day-in-the-life" tasks for administrating
1111
PostgreSQL cluster with the PostgreSQL Operator.
@@ -24,7 +24,7 @@ onerous for the intents of this guide.
2424
If you install the PostgreSQL Operator using the [quickstart](/quickstart/)
2525
guide, you will have two namespaces installed: `pgouser1` and `pgouser2`. We
2626
can choose to always use one of these namespaces by setting the `PGO_NAMESPACE`
27-
environmental variable, which is detailed in the global [`pgo` Client](/pgo-cli/)
27+
environmental variable, which is detailed in the global [`pgo` Client](/pgo-client/)
2828
reference,
2929

3030
For convenience, we will use the `pgouser1` namespace in the examples below.
@@ -74,7 +74,7 @@ environment.
7474
### Checking Connectivity to the PostgreSQL Operator
7575

7676
A common task when working with the PostgreSQL Operator is to check connectivity
77-
to the PostgreSQL Operator. This can be accomplish with the [`pgo version`](/pgo-cli/reference/pgo_version/)
77+
to the PostgreSQL Operator. This can be accomplish with the [`pgo version`](/pgo-client/reference/pgo_version/)
7878
command:
7979

8080
```shell
@@ -90,7 +90,7 @@ pgo-apiserver version 4.2.0
9090

9191
### Inspecting the PostgreSQL Operator Configuration
9292

93-
The [`pgo show config`](/pgo-cli/reference/pgo_status/) command allows you to
93+
The [`pgo show config`](/pgo-client/reference/pgo_status/) command allows you to
9494
view the current configuration that the PostgreSQL Operator is using. This can
9595
be helpful for troubleshooting issues such as which PostgreSQL images are being
9696
deployed by default, which storage classes are being used, etc.
@@ -177,7 +177,7 @@ DefaultPgbouncerResources: ""
177177
178178
### Viewing PostgreSQL Operator Key Metrics
179179
180-
The [`pgo status`](/pgo-cli/reference/pgo_status/) command provides a
180+
The [`pgo status`](/pgo-client/reference/pgo_status/) command provides a
181181
generalized statistical view of the overall resource consumption of the
182182
PostgreSQL Operator. These stats include:
183183

@@ -248,7 +248,7 @@ know which namespaces the PostgreSQL Operator can use for deploying PostgreSQL
248248
clusters.
249249

250250
You can view which namespaces the PostgreSQL Operator can utilize by using
251-
the [`pgo show namespace`](/pgo-cli/reference/pgo_show_namespace/) command. To
251+
the [`pgo show namespace`](/pgo-client/reference/pgo_show_namespace/) command. To
252252
list out the namespaces that the PostgreSQL Operator has access to, you can run
253253
the following command:
254254

@@ -281,7 +281,7 @@ described in the [general notes](#general-notes) on this page.
281281

282282
### Creating a PostgreSQL Cluster
283283

284-
You can create a cluster using the [`pgo create cluster`](/pgo-cli/reference/pgo_create_cluster/)
284+
You can create a cluster using the [`pgo create cluster`](/pgo-client/reference/pgo_create_cluster/)
285285
command:
286286

287287
```shell
@@ -309,7 +309,7 @@ pgo create cluster hagiscluster --ccp-image=crunchy-postgres-gis-ha
309309
A new PostgreSQL cluster can take a few moments to provision. You may have
310310
noticed that the `pgo create cluster` command returns something called a
311311
"workflow id". This workflow ID allows you to track the progress of your new
312-
PostgreSQL cluster while it is being provisioned using the [`pgo show workflow`](/pgo-cli/reference/pgo_show_workflow/)
312+
PostgreSQL cluster while it is being provisioned using the [`pgo show workflow`](/pgo-client/reference/pgo_show_workflow/)
313313
command:
314314

315315
```shell
@@ -329,7 +329,7 @@ workflowid ae714d12-f5d0-4fa9-910f-21944b41dec8
329329

330330
### View PostgreSQL Cluster Details
331331

332-
To see details about your PostgreSQL cluster, you can use the [`pgo show cluster`](/pgo-cli/reference/pgo_show_cluster/)
332+
To see details about your PostgreSQL cluster, you can use the [`pgo show cluster`](/pgo-client/reference/pgo_show_cluster/)
333333
command. These details include elements such as:
334334

335335
- The version of PostgreSQL that the cluster is using
@@ -403,7 +403,7 @@ pgo delete cluster hacluster --keep-backups
403403

404404
## Testing PostgreSQL Cluster Availability
405405

406-
You can test the availability of your cluster by using the [`pgo test`](/pgo-cli/reference/pgo_test/)
406+
You can test the availability of your cluster by using the [`pgo test`](/pgo-client/reference/pgo_test/)
407407
command. The `pgo test` command checks to see if the Kubernetes Services and
408408
the Pods that comprise the PostgreSQL cluster are available to receive
409409
connections. This includes:
@@ -593,7 +593,7 @@ pgo restore hacluster --node-label=failure-domain.beta.kubernetes.io/zone=us-cen
593593

594594
There are very few reasons why you will want to execute a full restore. If you
595595
want to make a copy of your PostgreSQL cluster, please use
596-
[`pgo clone`](/pgo-cli/reference/pgo_clone).
596+
[`pgo clone`](/pgo-client/reference/pgo_clone).
597597

598598
#### Point-in-time-Recovery (PITR)
599599

@@ -762,7 +762,7 @@ destroy.
762762
## Clone a PostgreSQL Cluster
763763

764764
You can create a copy of an existing PostgreSQL cluster in a new PostgreSQL
765-
cluster by using the [`pgo clone`](/pgo-cli/reference/pgo_clone/) command. To
765+
cluster by using the [`pgo clone`](/pgo-client/reference/pgo_clone/) command. To
766766
create a new copy of a PostgreSQL cluster, you can execute the following
767767
command:
768768

@@ -781,32 +781,39 @@ volume claim size by entering the following:
781781
pgo df hacluster -n pgouser1
782782
```
783783

784-
### Label Operations
784+
## Labels
785785

786-
#### Apply a Label to a Cluster
786+
Labels are a helpful way to organize PostgreSQL clusters, such as by application
787+
type or environment. The PostgreSQL Operator supports managing Kubernetes Labels
788+
as a convenient way to group PostgreSQL clusters together.
787789

788-
You can apply a Kubernetes label to a Postgres cluster as follows:
790+
You can view which labels are assigned to a PostgreSQL cluster using the
791+
[`pgo show cluster`](/pgo-client/reference/pgo_show_cluster/) command. You are also
792+
able to see these labels when using `kubectl` or `oc`.
789793

790-
pgo label hacluster --label=environment=prod -n pgouser1
794+
### Add a Label to a PostgreSQL Cluster
791795

792-
In this example, the label key is *environment* and the label
793-
value is *prod*.
796+
Labels can be added to PostgreSQL clusters using the [`pgo label`](/pgo-client/reference/pgo_label/)
797+
command. For example, to add a label with a key/value pair of `env=production`,
798+
you could execute the following command:
794799

795-
You can apply labels across a category of Postgres clusters by
796-
using the *--selector* command flag as follows:
797-
798-
pgo label --selector=clustertypes=research --label=environment=prod -n pgouser1
800+
```shell
801+
pgo label hacluster --label=env=production
802+
```
799803

800-
In this example, any Postgres cluster with the label of *clustertypes=research*
801-
will have the label *environment=prod* set.
804+
### Add a Label to Multiple PostgreSQL Clusters
802805

803-
In the following command, you can also view Postgres clusters by
804-
using the *--selector* command flag which specifies a label key value
805-
to search with:
806+
You can add also add a label to multiple PostgreSQL clusters simultaneously
807+
using the `--selector` flag on the `pgo label` command. For example, to add a
808+
label with a key/value pair of `env=production` to clusters that have a label
809+
key/value pair of `app=payment`, you could execute the following command:
806810

807-
pgo show cluster --selector=environment=prod -n pgouser1
811+
```shell
812+
pgo label --selector=app=payment --label=env=production
813+
```
808814

809815
## Policy Management
816+
810817
### Create a Policy
811818

812819
To create a SQL policy, enter the following:
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
---
2+
title: "pgo Client Reference"
3+
---
4+
## pgo
5+
6+
The pgo command line interface.
7+
8+
### Synopsis
9+
10+
The pgo command line interface lets you create and manage PostgreSQL clusters.
11+
12+
### Options
13+
14+
```
15+
--apiserver-url string The URL for the PostgreSQL Operator apiserver that will process the request from the pgo client.
16+
--debug Enable additional output for debugging.
17+
--disable-tls Disable TLS authentication to the Postgres Operator.
18+
--exclude-os-trust Exclude CA certs from OS default trust store
19+
-h, --help help for pgo
20+
-n, --namespace string The namespace to use for pgo requests.
21+
--pgo-ca-cert string The CA Certificate file path for authenticating to the PostgreSQL Operator apiserver.
22+
--pgo-client-cert string The Client Certificate file path for authenticating to the PostgreSQL Operator apiserver.
23+
--pgo-client-key string The Client Key file path for authenticating to the PostgreSQL Operator apiserver.
24+
```
25+
26+
### SEE ALSO
27+
28+
* [pgo apply](/pgo-client/reference/pgo_apply/) - Apply a policy
29+
* [pgo backup](/pgo-client/reference/pgo_backup/) - Perform a Backup
30+
* [pgo benchmark](/pgo-client/reference/pgo_benchmark/) - Perform a pgBench benchmark against clusters
31+
* [pgo cat](/pgo-client/reference/pgo_cat/) - Perform a cat command on a cluster
32+
* [pgo clone](/pgo-client/reference/pgo_clone/) - Copies the primary database of an existing cluster to a new cluster
33+
* [pgo create](/pgo-client/reference/pgo_create/) - Create a Postgres Operator resource
34+
* [pgo delete](/pgo-client/reference/pgo_delete/) - Delete an Operator resource
35+
* [pgo df](/pgo-client/reference/pgo_df/) - Display disk space for clusters
36+
* [pgo failover](/pgo-client/reference/pgo_failover/) - Performs a manual failover
37+
* [pgo label](/pgo-client/reference/pgo_label/) - Label a set of clusters
38+
* [pgo load](/pgo-client/reference/pgo_load/) - Perform a data load
39+
* [pgo ls](/pgo-client/reference/pgo_ls/) - Perform a ls command on a cluster
40+
* [pgo reload](/pgo-client/reference/pgo_reload/) - Perform a cluster reload
41+
* [pgo restore](/pgo-client/reference/pgo_restore/) - Perform a restore from previous backup
42+
* [pgo scale](/pgo-client/reference/pgo_scale/) - Scale a PostgreSQL cluster
43+
* [pgo scaledown](/pgo-client/reference/pgo_scaledown/) - Scale down a PostgreSQL cluster
44+
* [pgo show](/pgo-client/reference/pgo_show/) - Show the description of a cluster
45+
* [pgo status](/pgo-client/reference/pgo_status/) - Display PostgreSQL cluster status
46+
* [pgo test](/pgo-client/reference/pgo_test/) - Test cluster connectivity
47+
* [pgo update](/pgo-client/reference/pgo_update/) - Update a pgouser, pgorole, or cluster
48+
* [pgo upgrade](/pgo-client/reference/pgo_upgrade/) - Perform an upgrade
49+
* [pgo version](/pgo-client/reference/pgo_version/) - Print version information for the PostgreSQL Operator
50+
* [pgo watch](/pgo-client/reference/pgo_watch/) - Print watch information for the PostgreSQL Operator
51+
52+
###### Auto generated by spf13/cobra on 31-Dec-2019

hugo/content/pgo-cli/reference/pgo_apply.md renamed to hugo/content/pgo-client/reference/pgo_apply.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ pgo apply [flags]
2828
### Options inherited from parent commands
2929

3030
```
31-
--apiserver-url string The URL for the PostgreSQL Operator apiserver.
32-
--debug Enable debugging when true.
31+
--apiserver-url string The URL for the PostgreSQL Operator apiserver that will process the request from the pgo client.
32+
--debug Enable additional output for debugging.
3333
--disable-tls Disable TLS authentication to the Postgres Operator.
3434
--exclude-os-trust Exclude CA certs from OS default trust store
3535
-n, --namespace string The namespace to use for pgo requests.
@@ -40,6 +40,6 @@ pgo apply [flags]
4040

4141
### SEE ALSO
4242

43-
* [pgo](/pgo-cli/reference/pgo/) - The pgo command line interface.
43+
* [pgo](/pgo-client/reference/pgo/) - The pgo command line interface.
4444

45-
###### Auto generated by spf13/cobra on 27-Dec-2019
45+
###### Auto generated by spf13/cobra on 31-Dec-2019

0 commit comments

Comments
 (0)