Repository navigation
feat: allow configuring concurrency policy for fsck cronjob [backport #1006] - #1008
Conversation
This adds 'concurrencyPolicy' to the fsck job configuration in the Helm chart. It defaults to 'Forbid' to prevent multiple instances of fsck from running simultaneously, which could lead to resource exhaustion or database lock contention if a check takes longer than the scheduled interval. Changes: - Added 'fsck.job.concurrencyPolicy' to values.yaml. - Updated 'fsck-cronjob.yaml' template to apply the policy. - Added schema validation in 'values.schema.json'. - Updated documentation in 'Installation/Helm Chart.md' and 'Operations/Integrity Check (fsck).md'. - Added unit tests in 'tests/fsck_cronjob_test.yaml'. (cherry picked from commit 1d1504e)
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request enhances the Highlights
Changelog
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request introduces a configurable concurrencyPolicy for the fsck cronjob in the Helm chart, defaulting to Forbid. The changes are well-implemented across the Helm template, values, schema, tests, and documentation. My review includes one suggestion to improve the robustness of the Helm template to prevent potential rendering errors with certain user-provided values.
| app.kubernetes.io/component: fsck | ||
| spec: | ||
| schedule: {{ .Values.fsck.schedule | quote }} | ||
| concurrencyPolicy: {{ .Values.fsck.job.concurrencyPolicy }} |
There was a problem hiding this comment.
To improve template robustness, it's better to use the default function. This ensures that if fsck.job.concurrencyPolicy is explicitly set to null or an empty string in user-provided values, the chart will render a valid concurrencyPolicy (Forbid). This prevents potential template rendering errors or an invalid Kubernetes manifest. While values.yaml and values.schema.json provide defaults, this change handles edge cases where user values override the policy with a null or empty value.
concurrencyPolicy: {{ .Values.fsck.job.concurrencyPolicy | default "Forbid" }}
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## release-0.9 #1008 +/- ##
===========================================
Coverage 5.04% 5.04%
===========================================
Files 6 6
Lines 436 436
===========================================
Hits 22 22
Misses 410 410
Partials 4 4 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Bot-based backport to
release-0.9, triggered by a label in #1006.This adds 'concurrencyPolicy' to the fsck job configuration in the Helm
chart. It defaults to 'Forbid' to prevent multiple instances of fsck
from running simultaneously, which could lead to resource exhaustion or
database lock contention if a check takes longer than the scheduled
interval.
Changes:
'Operations/Integrity Check (fsck).md'.