feat(piped): make planpreview handler configurable via piped config
What this PR does: This PR makes the planpreview handler behavior configurable via the piped.yaml config file. This allows operators to tune performance and resource usage based on deployment scale or workload.
Changes
-
Added the following fields to PipedSpec:
-
handlerWorkerNum
-
handlerCommandQueueBufferSize
-
handlerCommandCheckInterval
-
handlerCommandHandleTimeout
Passed these values into the planpreview handler using new functional options:
-
WithWorkerNum
-
WithCommandQueueBufferSize
-
WithCommandCheckInterval
-
WithCommandHandleTimeout
Why we need it: We have some options in the planpreview package, but they are not used or are only used in the tests.
https://github.com/pipe-cd/pipecd/blob/d667a1c43fa245519079d106a717fe1e0125021a/pkg/app/piped/planpreview/handler.go#L52-L74
Which issue(s) this PR fixes:
Fixes #5916
Does this PR introduce a user-facing change? & How are users affected by this change: User now can add the handler configs.
- Is this breaking change: no