feat(plugin): add configurable timeout flag for status command by armru · Pull Request #9201 · cloudnative-pg/cloudnative-pg

@dosubot dosubot bot added the size:M

This PR changes 30-99 lines, ignoring generated files.

label

Nov 17, 2025

jbattiato

@dosubot dosubot bot added the lgtm

This PR has been approved by a maintainer

label

Nov 17, 2025

leonardoce

@armru @mnencia

Add a new --timeout flag to the `kubectl cnpg status` command to allow
users to configure the timeout for operations that access the pod
filesystem (e.g., `du` for calculating cluster size, `cat` for reading
configuration files).

The timeout parameter:
- Defaults to 10 seconds to maintain backward compatibility
- Can be adjusted using --timeout/-t flag (e.g., --timeout 45s)
- Is applied to all timeout-based operations in the status command

This addresses issues with large clusters (e.g., >1TB) where filesystem
operations may exceed the previous hardcoded 10-second timeout, causing
"context deadline exceeded" errors.

Signed-off-by: Armando Ruocco <armando.ruocco@enterprisedb.com>

cnpg-bot pushed a commit that referenced this pull request

Nov 20, 2025
Add a new `--timeout` flag to the `kubectl cnpg status` command to allow
users to configure the timeout for operations that access the pod
filesystem (e.g., `du` for calculating cluster size, `cat` for reading
configuration files).

The timeout parameter:
- Defaults to 10 seconds to maintain backward compatibility
- Can be adjusted using `--timeout`/`-t` flag (e.g., `--timeout 45s`)
- Is applied to all timeout-based operations in the status command

This addresses issues with large clusters (e.g., >1TB) where filesystem
operations may exceed the previous hardcoded 10-second timeout, causing
"context deadline exceeded" errors.

Closes #9164

Signed-off-by: Armando Ruocco <armando.ruocco@enterprisedb.com>
(cherry picked from commit d07d01d)