mirror of
https://github.com/cloudnative-pg/plugin-barman-cloud.git
synced 2026-03-10 20:52:22 +01:00
Compare commits
3 Commits
d4863a41ad
...
fe7662559c
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
fe7662559c | ||
|
|
921b20c249 | ||
|
|
65c962f515 |
@ -128,6 +128,7 @@ pluginConfiguration
|
|||||||
podName
|
podName
|
||||||
postgres
|
postgres
|
||||||
postgresql
|
postgresql
|
||||||
|
pprof
|
||||||
primaryUpdateStrategy
|
primaryUpdateStrategy
|
||||||
rbac
|
rbac
|
||||||
rc
|
rc
|
||||||
|
|||||||
@ -52,6 +52,13 @@ func NewCmd() *cobra.Command {
|
|||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
cmd.Flags().String("pprof-server",
|
||||||
|
"",
|
||||||
|
"The address where pprof server should be exposed, for example: 0.0.0.0:6061. "+
|
||||||
|
"Empty string means disabled. Disabled by default",
|
||||||
|
)
|
||||||
|
_ = viper.BindPFlag("pprof-server", cmd.Flags().Lookup("pprof-server"))
|
||||||
|
|
||||||
_ = viper.BindEnv("namespace", "NAMESPACE")
|
_ = viper.BindEnv("namespace", "NAMESPACE")
|
||||||
_ = viper.BindEnv("cluster-name", "CLUSTER_NAME")
|
_ = viper.BindEnv("cluster-name", "CLUSTER_NAME")
|
||||||
_ = viper.BindEnv("pod-name", "POD_NAME")
|
_ = viper.BindEnv("pod-name", "POD_NAME")
|
||||||
|
|||||||
@ -52,6 +52,7 @@ func Start(ctx context.Context) error {
|
|||||||
namespace := viper.GetString("namespace")
|
namespace := viper.GetString("namespace")
|
||||||
|
|
||||||
controllerOptions := ctrl.Options{
|
controllerOptions := ctrl.Options{
|
||||||
|
PprofBindAddress: viper.GetString("pprof-server"),
|
||||||
Scheme: scheme,
|
Scheme: scheme,
|
||||||
Client: client.Options{
|
Client: client.Options{
|
||||||
// Important: the caching options below are used by
|
// Important: the caching options below are used by
|
||||||
|
|||||||
@ -56,6 +56,8 @@ Both checks are required before proceeding with the installation.
|
|||||||
|
|
||||||
import { InstallationSnippet } from '@site/src/components/Installation';
|
import { InstallationSnippet } from '@site/src/components/Installation';
|
||||||
|
|
||||||
|
### Directly using the manifest
|
||||||
|
|
||||||
Install the plugin using `kubectl` by applying the manifest for the latest
|
Install the plugin using `kubectl` by applying the manifest for the latest
|
||||||
release:
|
release:
|
||||||
|
|
||||||
@ -98,6 +100,18 @@ deployment "barman-cloud" successfully rolled out
|
|||||||
|
|
||||||
This confirms that the plugin is deployed and ready to use.
|
This confirms that the plugin is deployed and ready to use.
|
||||||
|
|
||||||
|
### Using the Helm Chart
|
||||||
|
|
||||||
|
The plugin can be installed using the provided [Helm chart](https://github.com/cloudnative-pg/charts/tree/main/charts/plugin-barman-cloud):
|
||||||
|
|
||||||
|
```sh
|
||||||
|
helm repo add cnpg https://cloudnative-pg.github.io/charts
|
||||||
|
helm upgrade --install barman-cloud \
|
||||||
|
--namespace cnpg-system \
|
||||||
|
--create-namespace \
|
||||||
|
cnpg/plugin-barman-cloud
|
||||||
|
```
|
||||||
|
|
||||||
## Testing the latest development snapshot
|
## Testing the latest development snapshot
|
||||||
|
|
||||||
You can also test the latest development snapshot of the plugin with the
|
You can also test the latest development snapshot of the plugin with the
|
||||||
|
|||||||
@ -74,3 +74,24 @@ spec:
|
|||||||
|
|
||||||
For a complete list of supported options, refer to the
|
For a complete list of supported options, refer to the
|
||||||
[official Barman Cloud documentation](https://docs.pgbarman.org/release/latest/).
|
[official Barman Cloud documentation](https://docs.pgbarman.org/release/latest/).
|
||||||
|
|
||||||
|
## Enable the pprof debug server for the sidecar
|
||||||
|
|
||||||
|
You can enable the instance sidecar's pprof debug HTTP server by adding the `--pprof-server=<address>` flag to the container's
|
||||||
|
arguments via `.spec.instanceSidecarConfiguration.additionalContainerArgs`.
|
||||||
|
|
||||||
|
Pass a bind address in the form `<host>:<port>` (for example, `0.0.0.0:6061`).
|
||||||
|
An empty value disables the server (disabled by default).
|
||||||
|
|
||||||
|
### Example
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
apiVersion: barmancloud.cnpg.io/v1
|
||||||
|
kind: ObjectStore
|
||||||
|
metadata:
|
||||||
|
name: my-store
|
||||||
|
spec:
|
||||||
|
instanceSidecarConfiguration:
|
||||||
|
additionalContainerArgs:
|
||||||
|
- "--pprof-server=0.0.0.0:6061"
|
||||||
|
```
|
||||||
|
|||||||
@ -56,6 +56,8 @@ Both checks are required before proceeding with the installation.
|
|||||||
|
|
||||||
import { InstallationSnippet } from '@site/src/components/Installation';
|
import { InstallationSnippet } from '@site/src/components/Installation';
|
||||||
|
|
||||||
|
### Directly using the manifest
|
||||||
|
|
||||||
Install the plugin using `kubectl` by applying the manifest for the latest
|
Install the plugin using `kubectl` by applying the manifest for the latest
|
||||||
release:
|
release:
|
||||||
|
|
||||||
@ -98,6 +100,19 @@ deployment "barman-cloud" successfully rolled out
|
|||||||
|
|
||||||
This confirms that the plugin is deployed and ready to use.
|
This confirms that the plugin is deployed and ready to use.
|
||||||
|
|
||||||
|
### Using the Helm Chart
|
||||||
|
|
||||||
|
The plugin can be installed using the provided [Helm chart](https://github.com/cloudnative-pg/charts/tree/main/charts/plugin-barman-cloud):
|
||||||
|
|
||||||
|
```sh
|
||||||
|
helm repo add cnpg https://cloudnative-pg.github.io/charts
|
||||||
|
helm upgrade --install barman-cloud \
|
||||||
|
--namespace cnpg-system \
|
||||||
|
--create-namespace \
|
||||||
|
--version 0.1.0 \
|
||||||
|
cnpg/plugin-barman-cloud
|
||||||
|
```
|
||||||
|
|
||||||
## Testing the latest development snapshot
|
## Testing the latest development snapshot
|
||||||
|
|
||||||
You can also test the latest development snapshot of the plugin with the
|
You can also test the latest development snapshot of the plugin with the
|
||||||
|
|||||||
@ -56,6 +56,8 @@ Both checks are required before proceeding with the installation.
|
|||||||
|
|
||||||
import { InstallationSnippet } from '@site/src/components/Installation';
|
import { InstallationSnippet } from '@site/src/components/Installation';
|
||||||
|
|
||||||
|
### Directly using the manifest
|
||||||
|
|
||||||
Install the plugin using `kubectl` by applying the manifest for the latest
|
Install the plugin using `kubectl` by applying the manifest for the latest
|
||||||
release:
|
release:
|
||||||
|
|
||||||
@ -98,6 +100,19 @@ deployment "barman-cloud" successfully rolled out
|
|||||||
|
|
||||||
This confirms that the plugin is deployed and ready to use.
|
This confirms that the plugin is deployed and ready to use.
|
||||||
|
|
||||||
|
### Using the Helm Chart
|
||||||
|
|
||||||
|
The plugin can be installed using the provided [Helm chart](https://github.com/cloudnative-pg/charts/tree/main/charts/plugin-barman-cloud):
|
||||||
|
|
||||||
|
```sh
|
||||||
|
helm repo add cnpg https://cloudnative-pg.github.io/charts
|
||||||
|
helm upgrade --install barman-cloud \
|
||||||
|
--namespace cnpg-system \
|
||||||
|
--create-namespace \
|
||||||
|
--version 0.2.0 \
|
||||||
|
cnpg/plugin-barman-cloud
|
||||||
|
```
|
||||||
|
|
||||||
## Testing the latest development snapshot
|
## Testing the latest development snapshot
|
||||||
|
|
||||||
You can also test the latest development snapshot of the plugin with the
|
You can also test the latest development snapshot of the plugin with the
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user