-
Notifications
You must be signed in to change notification settings - Fork 3
Doc: review pages organization #99
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
e50a707
e57bef4
a338a63
741b92f
e3c2904
6b3322e
b291e09
1171f4c
3c1258b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -1,16 +1,18 @@ | ||||||
| --- | ||||||
| sidebar_position: 6 | ||||||
| sidebar_position: 3 | ||||||
| --- | ||||||
|
|
||||||
| import CodeBlock from '@theme/CodeBlock'; | ||||||
| import StanzaCustom from '!!raw-loader!../../examples/stanza_custom.yaml'; | ||||||
| import PluginConfig from '!!raw-loader!../../examples/plugin_config.yaml'; | ||||||
| import StanzaS3 from '!!raw-loader!../../examples/stanza.yaml'; | ||||||
| import StanzaAzure from '!!raw-loader!../../examples/stanza_azure.yaml'; | ||||||
|
|
||||||
| # Configuration | ||||||
|
|
||||||
| This pgBackRest plugin supports three levels of configuration: | ||||||
|
|
||||||
| - **Managed configuration:** Options defined via the Stanza or | ||||||
| - **Managed configuration:** Options defined via the `Stanza` or | ||||||
| `PluginConfig` CRD. | ||||||
| - **Environment variables:** Free-form variables that can be specified | ||||||
| using `CustomEnvVars`. `CustomEnvVars` is a list of variables. | ||||||
|
|
@@ -76,6 +78,29 @@ PGBACKREST_MY_CUSTOM=CNPG_ROCKS | |||||
| To run pgBackRest with parameters not directly managed by this plugin, | ||||||
| the `CustomEnvVar` option can be used. | ||||||
|
|
||||||
| ## Supported repositories type (S3 and Azure) | ||||||
|
|
||||||
| The pgBackRest plugin enables PostgreSQL backup files to be stored in: | ||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
"PostgreSQL" here could be confusing. I suggest to remove it and add WAL files in sentence. |
||||||
|
|
||||||
| - Amazon s3 | ||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
| - Microsoft Azure Blob Storage | ||||||
|
|
||||||
| The plugin relies on the protocols that pgBackRest supports natively. To | ||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
| configure the repositories for pgBackRest, you must define a `Stanza` | ||||||
| object, which establishes the link between your PostgreSQL `Cluster` and | ||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
Maybe use "one" to be sure people understand that one stanza = one cluster |
||||||
| the repository or repositories. | ||||||
|
|
||||||
| Below are a few examples of how to use the supported backup storage | ||||||
| backend. | ||||||
|
|
||||||
| ### Amazon S3, or S3 compatible solutions | ||||||
|
|
||||||
| <CodeBlock language="yaml">{StanzaS3}</CodeBlock> | ||||||
|
|
||||||
| ### Azure Blob Storage | ||||||
|
|
||||||
| <CodeBlock language="yaml">{StanzaAzure}</CodeBlock> | ||||||
|
|
||||||
| <!-- | ||||||
| vim: spelllang=en spell | ||||||
| --> | ||||||
| Original file line number | Diff line number | Diff line change | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -4,6 +4,41 @@ sidebar_position: 7 | |||||||||||||
|
|
||||||||||||||
| # Contribute | ||||||||||||||
|
|
||||||||||||||
| ## Basic info on how a CNPG plugin works | ||||||||||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||
|
|
||||||||||||||
| Here are some basic informations about how this plugin should work: | ||||||||||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||
|
|
||||||||||||||
| - When installing the plugin, a new deployment is created to run a Pod | ||||||||||||||
| for the controller (`pgbackrest-controller`) of our plugin in the same | ||||||||||||||
| namespace as the CNPG operator. | ||||||||||||||
|
Comment on lines
+11
to
+13
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||
|
|
||||||||||||||
| - The CNPG operator detects the plugin when a dedicated Kubernetes | ||||||||||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do we need to add the name of this ressource ? |
||||||||||||||
| Service (with some specific annotations) is created. | ||||||||||||||
|
|
||||||||||||||
| - Our specialized controller exposes the supported capabilities (at | ||||||||||||||
| least those required to manage the | ||||||||||||||
| [lifecycle](https://pkg.go.dev/github.com/cloudnative-pg/cnpg-i@v0.1.0/pkg/lifecycle) | ||||||||||||||
| of our CNPG instances) to the CNPG operator. | ||||||||||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||
|
|
||||||||||||||
| - When initializing a new Cluster configured with our plugin, the | ||||||||||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||
| pgBackRest controller will be called by the CloudNativePG operator. | ||||||||||||||
|
|
||||||||||||||
| - The plugin controller modifies the resources (Deployment / Pods / | ||||||||||||||
| Jobs) requested by the CNPG operator (this is done before requesting | ||||||||||||||
| the Kubernetes API), and inject some configuration if needed. | ||||||||||||||
|
Comment on lines
+26
to
+28
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||
|
|
||||||||||||||
| For our pgbackrest plugin, the controller inject a sidecar container | ||||||||||||||
| for `pgBackRest` within the PostgreSQL Pods. This sidecar container | ||||||||||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||
| executes a manager dedicated to `pgBackRest` (which expose the | ||||||||||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||
| required capabilities archive the WAL and backup the PostgreSQL | ||||||||||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||
| instance). | ||||||||||||||
|
|
||||||||||||||
| - Our newly created PostgreSQL instance will call the dedicated | ||||||||||||||
| `pgBackRest` manager (on the side container) when the archive command | ||||||||||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||
| is triggered. | ||||||||||||||
|
|
||||||||||||||
| https://github.com/cloudnative-pg/cnpg-i/blob/main/docs/protocol.md#cnpgi-wal-v1-WALCapability-RPC | ||||||||||||||
|
|
||||||||||||||
| ## Deploy CloudNativePG on kind | ||||||||||||||
|
|
||||||||||||||
| To contribute and test the pgBackRest plugin, a dedicated Kubernetes | ||||||||||||||
|
|
||||||||||||||
This file was deleted.
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -4,16 +4,10 @@ sidebar_position: 2 | |||||
|
|
||||||
| # Installation | ||||||
|
|
||||||
| To install and use this plugin, Kubernetes and CloudNativePG users should : | ||||||
| ## Install prod-ready version | ||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||||||
|
|
||||||
| 1. Install the plugin by applying the manifest located in the | ||||||
| `kubernetes` directory : | ||||||
|
|
||||||
| ``` console | ||||||
| kubectl apply -k ./kubernetes/prod | ||||||
| ``` | ||||||
|
|
||||||
| Users can also use the manifest file from GitHub: | ||||||
| This plugin can be installed and used by Kubernetes and CloudNativePG | ||||||
| users via the manifest located at the root of the repository. | ||||||
|
|
||||||
| ``` console | ||||||
| $ kubectl apply -f \ | ||||||
|
|
@@ -22,71 +16,76 @@ $ kubectl apply -f \ | |||||
|
|
||||||
| This will install the plugin in the same `Namespace` as the operator. | ||||||
|
|
||||||
| # Verifications | ||||||
| ### Verifications | ||||||
|
|
||||||
| The installation can be verified by checking the presence and status | ||||||
| of the `pgbackrest-controller` deployment in the namespace used by the | ||||||
| The installation can be verified by checking the presence and status of | ||||||
| the `pgbackrest-controller` deployment in the namespace used by the | ||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
| CloudNativePG operator (e.g., `cnpg-system`). | ||||||
|
|
||||||
| ```console | ||||||
| ``` console | ||||||
| kubectl get pod -n cnpg-system | ||||||
| NAME READY STATUS RESTARTS AGE | ||||||
| cnpg-controller-manager-65bfdb64c9-hwvpd 1/1 Running 0 9m4s | ||||||
| pgbackrest-controller-fc9f4d5f4-5w6wt 1/1 Running 0 15s | ||||||
| ``` | ||||||
|
|
||||||
| And also by confirming | ||||||
| that the `Custom Resource Definition` `stanza.pgbackrest.dalibo.com` | ||||||
| is installed. | ||||||
| And also by confirming that the `Custom Resource Definition` | ||||||
| `stanza.pgbackrest.dalibo.com` is installed. | ||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. And PluginConfig as well. |
||||||
|
|
||||||
| ```console | ||||||
| ``` console | ||||||
| kubectl api-resources --api-group pgbackrest.dalibo.com | ||||||
| NAME SHORTNAMES APIVERSION NAMESPACED KIND | ||||||
| stanzas pgbackrest.dalibo.com/v1 true Stanza | ||||||
| ``` | ||||||
|
|
||||||
| # Testing versions | ||||||
| ## Testing versions | ||||||
|
|
||||||
| To use the latest testing or unstable version of this plugin, | ||||||
| apply the `test` kustomize overlay. It is configured to pull | ||||||
| the latest alpha/beta images from Docker Hub. You can simply run : | ||||||
| ```console | ||||||
| To use the latest testing or unstable version of this plugin, apply the | ||||||
| `test` kustomize overlay. It is configured to pull the latest alpha/beta | ||||||
| images from Docker Hub. You can simply run : | ||||||
|
|
||||||
| ``` console | ||||||
| kubectl apply -k kubernetes/test | ||||||
| ``` | ||||||
|
|
||||||
| ## Dev version | ||||||
|
|
||||||
| 1. Build locally the Docker images and load them to a registry that is accessible | ||||||
| by your Kubernetes cluster. | ||||||
| 1. Build locally the Docker images and load them to a registry that is | ||||||
| accessible by your Kubernetes cluster. | ||||||
|
|
||||||
| You can build them locally with the command : | ||||||
| ```console | ||||||
|
|
||||||
| ``` console | ||||||
| make build-images | ||||||
| ``` | ||||||
|
|
||||||
| It will execute the appropriate `docker build` commands. | ||||||
|
|
||||||
| 2. Install the plugin by applying the manifest located in the | ||||||
| `kubernetes` directory : | ||||||
| 2. Install the plugin by applying the manifest located in the | ||||||
| `kubernetes` directory : | ||||||
|
|
||||||
| ``` console | ||||||
| kubectl apply -k ./kubernetes/dev | ||||||
| ``` | ||||||
|
|
||||||
| :::note | ||||||
| Kustomize layers and overlays are available in the `kubernetes` directory. | ||||||
| You can add your own customisation to patch the resources provided by default. | ||||||
|
|
||||||
| Kustomize layers and overlays are available in the `kubernetes` | ||||||
| directory. You can add your own customisation to patch the resources | ||||||
| provided by default. | ||||||
|
|
||||||
| ::: | ||||||
|
|
||||||
| # Customisation | ||||||
| ## Customisation | ||||||
|
|
||||||
| The image used by the CloudNativePG instance sidecar container can be customised | ||||||
| by adding the `SIDECAR_IMAGE` environment variable to the pgbackrest plugin | ||||||
| controller container. | ||||||
| The image used by the CloudNativePG instance sidecar container can be | ||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
| customised by adding the `SIDECAR_IMAGE` environment variable to the | ||||||
| pgbackrest plugin controller container. | ||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
|
|
||||||
| For example, this patch can be used to add the `SIDECAR_IMAGE` variable : | ||||||
| For example, this patch can be used to add the `SIDECAR_IMAGE` variable | ||||||
| : | ||||||
|
|
||||||
| ```yaml | ||||||
| ``` yaml | ||||||
| apiVersion: apps/v1 | ||||||
| kind: Deployment | ||||||
| metadata: | ||||||
|
|
||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.