Compare commits

...

3 Commits

Author SHA1 Message Date
renovate[bot]
054489aa20
Merge e54c5d7f74 into 921b20c249 2025-11-29 20:33:15 +08:00
Armando Ruocco
921b20c249
feat: add pprof-server support (#538)
Some checks failed
Deploy Docusaurus to GitHub Pages / build (push) Failing after 5s
Deploy Docusaurus to GitHub Pages / deploy (push) Has been skipped
release-please / release-please (push) Failing after 2s
Barman Base Image / build (push) Failing after 6s
Closes #421

Signed-off-by: Armando Ruocco <armando.ruocco@enterprisedb.com>
2025-11-26 17:54:34 +01:00
renovate[bot]
e54c5d7f74
chore(deps): update dependency dagger/dagger to v0.19.7
| datasource  | package       | from    | to      |
| ----------- | ------------- | ------- | ------- |
| github-tags | dagger/dagger | v0.19.5 | v0.19.7 |


Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-11-21 09:43:42 +00:00
9 changed files with 36 additions and 6 deletions

View File

@ -27,7 +27,7 @@ jobs:
- name: Install Dagger - name: Install Dagger
env: env:
# renovate: datasource=github-tags depName=dagger/dagger versioning=semver # renovate: datasource=github-tags depName=dagger/dagger versioning=semver
DAGGER_VERSION: 0.19.5 DAGGER_VERSION: 0.19.7
run: | run: |
curl -L https://dl.dagger.io/dagger/install.sh | BIN_DIR=$HOME/.local/bin sh curl -L https://dl.dagger.io/dagger/install.sh | BIN_DIR=$HOME/.local/bin sh
- name: Publish a barman-base - name: Publish a barman-base

View File

@ -44,7 +44,7 @@ jobs:
- name: Install Dagger - name: Install Dagger
env: env:
# renovate: datasource=github-tags depName=dagger/dagger versioning=semver # renovate: datasource=github-tags depName=dagger/dagger versioning=semver
DAGGER_VERSION: 0.19.5 DAGGER_VERSION: 0.19.7
run: | run: |
curl -L https://dl.dagger.io/dagger/install.sh | BIN_DIR=$HOME/.local/bin sh curl -L https://dl.dagger.io/dagger/install.sh | BIN_DIR=$HOME/.local/bin sh
- name: Run CI task - name: Run CI task

View File

@ -31,7 +31,7 @@ jobs:
- name: Install Dagger - name: Install Dagger
env: env:
# renovate: datasource=github-tags depName=dagger/dagger versioning=semver # renovate: datasource=github-tags depName=dagger/dagger versioning=semver
DAGGER_VERSION: 0.19.5 DAGGER_VERSION: 0.19.7
run: | run: |
curl -L https://dl.dagger.io/dagger/install.sh | BIN_DIR=$HOME/.local/bin sh curl -L https://dl.dagger.io/dagger/install.sh | BIN_DIR=$HOME/.local/bin sh
- name: Create image and manifest - name: Create image and manifest

View File

@ -21,7 +21,7 @@ jobs:
- name: Install Dagger - name: Install Dagger
env: env:
# renovate: datasource=github-tags depName=dagger/dagger versioning=semver # renovate: datasource=github-tags depName=dagger/dagger versioning=semver
DAGGER_VERSION: 0.19.5 DAGGER_VERSION: 0.19.7
run: | run: |
curl -L https://dl.dagger.io/dagger/install.sh | BIN_DIR=$HOME/.local/bin sh curl -L https://dl.dagger.io/dagger/install.sh | BIN_DIR=$HOME/.local/bin sh
- name: Create image and manifest - name: Create image and manifest

View File

@ -128,6 +128,7 @@ pluginConfiguration
podName podName
postgres postgres
postgresql postgresql
pprof
primaryUpdateStrategy primaryUpdateStrategy
rbac rbac
rc rc

View File

@ -202,7 +202,7 @@ tasks:
- start-build-network - start-build-network
vars: vars:
# renovate: datasource=github-tags depName=dagger/dagger versioning=semver # renovate: datasource=github-tags depName=dagger/dagger versioning=semver
DAGGER_VERSION: 0.19.5 DAGGER_VERSION: 0.19.7
DAGGER_ENGINE_IMAGE: registry.dagger.io/engine:v{{ .DAGGER_VERSION }} DAGGER_ENGINE_IMAGE: registry.dagger.io/engine:v{{ .DAGGER_VERSION }}
cmds: cmds:
- > - >

View File

@ -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")

View File

@ -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

View File

@ -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"
```