Commit d07d01d
authored
feat(plugin): add configurable timeout flag for status command (cloudnative-pg#9201)
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 cloudnative-pg#9164
Signed-off-by: Armando Ruocco <armando.ruocco@enterprisedb.com>1 parent c78f5a7 commit d07d01d
File tree
3 files changed
+27
-9
lines changed- docs/src
- internal/cmd/plugin/status
3 files changed
+27
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
360 | 360 | | |
361 | 361 | | |
362 | 362 | | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
363 | 370 | | |
364 | 371 | | |
365 | 372 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| 25 | + | |
25 | 26 | | |
26 | 27 | | |
27 | 28 | | |
| |||
47 | 48 | | |
48 | 49 | | |
49 | 50 | | |
| 51 | + | |
50 | 52 | | |
51 | | - | |
| 53 | + | |
52 | 54 | | |
53 | 55 | | |
54 | 56 | | |
55 | 57 | | |
56 | 58 | | |
57 | 59 | | |
58 | 60 | | |
| 61 | + | |
| 62 | + | |
59 | 63 | | |
60 | 64 | | |
61 | 65 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
111 | 111 | | |
112 | 112 | | |
113 | 113 | | |
| 114 | + | |
114 | 115 | | |
115 | 116 | | |
116 | 117 | | |
| |||
134 | 135 | | |
135 | 136 | | |
136 | 137 | | |
137 | | - | |
| 138 | + | |
138 | 139 | | |
139 | 140 | | |
140 | 141 | | |
141 | 142 | | |
142 | | - | |
| 143 | + | |
143 | 144 | | |
144 | 145 | | |
145 | 146 | | |
| |||
216 | 217 | | |
217 | 218 | | |
218 | 219 | | |
219 | | - | |
220 | | - | |
221 | | - | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
222 | 225 | | |
223 | 226 | | |
224 | 227 | | |
| |||
238 | 241 | | |
239 | 242 | | |
240 | 243 | | |
241 | | - | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
242 | 249 | | |
243 | 250 | | |
244 | | - | |
| 251 | + | |
245 | 252 | | |
246 | 253 | | |
247 | 254 | | |
| |||
481 | 488 | | |
482 | 489 | | |
483 | 490 | | |
| 491 | + | |
484 | 492 | | |
485 | | - | |
486 | 493 | | |
487 | 494 | | |
488 | 495 | | |
| |||
0 commit comments