Skip to content

feat: allow configuring concurrency policy for fsck cronjob [backport #1006] - #1008

Merged
kalbasit merged 1 commit into
release-0.9from
backport-1006-to-release-0.9
Mar 1, 2026
Merged

kalbasit merged 1 commit into
release-0.9from
backport-1006-to-release-0.9

Conversation

@kalbasit

@kalbasit kalbasit commented Mar 1, 2026

Copy link
Copy Markdown
Owner

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:

  • 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'.

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)
@kalbasit
kalbasit enabled auto-merge (squash) March 1, 2026 08:36
@dosubot dosubot Bot added size:M This PR changes 30-99 lines, ignoring generated files. helm labels Mar 1, 2026
@gemini-code-assist

Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, 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 fsck cronjob configuration within the Helm chart by introducing a concurrencyPolicy setting. This feature allows administrators to control how the cronjob behaves when a new scheduled run is due while a previous one is still active. By defaulting to 'Forbid', the change aims to improve the stability and resource management of the fsck process, preventing potential issues arising from overlapping executions.

Highlights

  • Configurable Concurrency Policy: Introduced a configurable concurrencyPolicy for the fsck cronjob, allowing users to define how concurrent job executions are handled.
  • Default Concurrency Policy: Set the default concurrencyPolicy to Forbid to prevent multiple fsck instances from running simultaneously, mitigating potential resource exhaustion or database contention.
  • Schema Validation: Implemented schema validation for the new concurrencyPolicy field in values.schema.json, ensuring valid input values (Allow, Forbid, Replace).
  • Unit Tests: Added unit tests to verify the correct application of the concurrencyPolicy and its default value in the fsck cronjob template.
  • Documentation Updates: Updated relevant documentation files to reflect the new concurrencyPolicy option and its usage within the Helm chart and fsck operations guide.
Changelog
  • charts/ncps/templates/fsck-cronjob.yaml
    • Added concurrencyPolicy field to the CronJob spec, dynamically set from Helm values.
  • charts/ncps/tests/fsck_cronjob_test.yaml
    • Added a test case to verify that the concurrencyPolicy can be configured.
    • Added a test case to confirm that Forbid is used as the default concurrencyPolicy when not explicitly set.
  • charts/ncps/values.schema.json
    • Defined the schema for fsck.job.concurrencyPolicy, including its type, default value (Forbid), and allowed enum values (Allow, Forbid, Replace).
  • charts/ncps/values.yaml
    • Added concurrencyPolicy: Forbid under fsck.job to establish the default behavior.
  • docs/docs/User Guide/Installation/Helm Chart.md
    • Updated the example Helm chart configuration to include the fsck.job.concurrencyPolicy setting.
  • docs/docs/User Guide/Installation/Helm Chart/Chart Reference.md
    • Added an entry for fsck.job.concurrencyPolicy to the chart reference table, detailing its purpose and default.
  • docs/docs/User Guide/Operations/Integrity Check (fsck).md
    • Updated the fsck operations guide with an example showing the concurrencyPolicy configuration.
Activity
Using Gemini Code Assist

The 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 /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

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 .gemini/ folder in the base of the repository. Detailed instructions can be found here.

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

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution. ↩

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 }}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

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" }}

@github-actions

github-actions Bot commented Mar 1, 2026

Copy link
Copy Markdown
Contributor

@dosubot

dosubot Bot commented Mar 1, 2026

Copy link
Copy Markdown

Related Documentation

Checked 7 published document(s) in 1 knowledge base(s). No updates required.

How did I do? Any feedback?  Join Discord

@codecov

codecov Bot commented Mar 1, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 5.04%. Comparing base (2b6cce2) to head (da1f937).
⚠️ Report is 1 commits behind head on release-0.9.

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@kalbasit
kalbasit merged commit e01ac69 into release-0.9 Mar 1, 2026
12 checks passed
@kalbasit
kalbasit deleted the backport-1006-to-release-0.9 branch March 1, 2026 08:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

helm size:M This PR changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant