feat: add terminationGracePeriodSeconds field to CollectorSpec#3340
Conversation
Signed-off-by: Vitalii Parfonov <vparfono@redhat.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (8)
📝 WalkthroughWalkthroughAdds an optional TerminationGracePeriodSeconds field to CollectorSpec, with deepcopy support and CRD/CSV manifest updates. Collector pod-spec construction now uses this field when set, falling back to a new default constant. Corresponding Ginkgo tests verify default and configured behavior. ChangesTermination grace period feature
Estimated code review effort: 2 (Simple) | ~12 minutes Related PRs: None identified. Suggested labels: api-review, enhancement Suggested reviewers: None identified. Poem: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Warning Tools execution failed with the following error: Failed to run tools: 13 INTERNAL: Received RST_STREAM with code 2 (Internal server error) Comment |
|
/approve |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: jcantrill, vparfonov The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
/retest-required |
|
@vparfonov: The following test failed, say
Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
7f27cca
into
openshift:master
Description
Problem
The collector pods have
terminationGracePeriodSecondshardcoded to10 seconds. WhendeliveryMode: AtLeastOnceis configured, Vector uses disk buffers to persist log data. During shutdown, Vector needs time to flush in-memory events to disk and close connections to remote sinks. If the grace period is too short, Kubernetes sendsSIGKILLwhile a write is in progress, corrupting the disk buffer and causingCrashLoopBackOffwithInvalidProtobufPayloaderrors on restart.Solution
Expose
terminationGracePeriodSecondsas a configurable field inspec.collector, allowing users to set the appropriate grace period for their environment.spec.collector.terminationGracePeriodSecondsExample
/cc @Clee2691
/assign @jcantrill
Links
Summary by CodeRabbit
New Features
Bug Fixes