Skip to content

chore: drop legacy capabilities.backend-storage support - #919

Merged
matthyx merged 1 commit into
mainfrom
drop-legacy-backend-storage
Sep 15, 2026
Merged

matthyx merged 1 commit into
mainfrom
drop-legacy-backend-storage

Conversation

@matthyx

@matthyx matthyx commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

Overview

Drops the legacy fallback to capabilities.backend-storage: enable in _common.tpl.

Following the refactoring in #884 where nodeAgent.config.extra.backendStorageEnabled was introduced, this PR cleans up the upstream chart by:

  1. Removing the fallback else if eq (index .Values.capabilities "backend-storage" | default "") "enable" in the configurations template.
  2. Cleaning up obsolete legacy unit tests in malware_capability_gate_test.yaml.
  3. Bumping the chart version and appVersion to 1.40.5.

How to Test

Run helm unit tests:

helm unittest charts/kubescape-operator

Checklist before requesting a review

  • My code follows the style guidelines of this project
  • I have commented on my code, particularly in hard-to-understand areas
  • I have performed a self-review of my code
  • If it is a core feature, I have added thorough tests.
  • New and existing unit tests pass locally with my changes

@coderabbitai

coderabbitai Bot commented Sep 7, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Team

Run ID: 9f205016-6f22-42ee-94e9-e5155e1bb893

📥 Commits

Reviewing files that changed from the base of the PR and between e65396c and 3cd1a27.

⛔ Files ignored due to path filters (1)
  • charts/kubescape-operator/tests/__snapshot__/snapshot_test.yaml.snap is excluded by !**/*.snap
📒 Files selected for processing (3)
  • charts/kubescape-operator/Chart.yaml
  • charts/kubescape-operator/templates/_common.tpl
  • charts/kubescape-operator/tests/malware_capability_gate_test.yaml

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

The chart now enables backend storage only through nodeAgent.config.extra.backendStorageEnabled. It rejects enabled values for the deprecated capabilities.backend-storage setting. Tests cover the failure and retained defaults. Chart and application versions increase to 1.40.5.

Changes

Backend storage capability deprecation

Layer / File(s) Summary
Reject deprecated backend storage capability
charts/kubescape-operator/templates/_common.tpl, charts/kubescape-operator/tests/malware_capability_gate_test.yaml
The template removes legacy capability-based backend storage activation and fails rendering when the deprecated capability is enabled. Tests validate the failure message and the disable default.
Update chart release version
charts/kubescape-operator/Chart.yaml
The chart version and appVersion fields increase from 1.40.4 to 1.40.5.

Estimated code review effort: 2 (Simple) | ~10 minutes

Merge Risk: ⚪ Minimal · up to 3cd1a

The chart now rejects the removed backend-storage capability and uses node-agent configuration for backend storage enablement. Existing deprecated enabled configurations will receive a clear render-time migration error; no current merge-blocking risk is identified.

Suggested reviewers: slashben

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: removal of legacy capabilities.backend-storage support.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch drop-legacy-backend-storage

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Remove fallback to capabilities.backend-storage enable in configurations and clean up obsolete tests. Bump chart version to 1.40.5.

Signed-off-by: Matthias Bertschy <matthias.bertschy@gmail.com>
@matthyx
matthyx force-pushed the drop-legacy-backend-storage branch from 3cd1a27 to 2400870 Compare September 7, 2026 06:02
@matthyx matthyx moved this to WIP in KS PRs tracking Sep 7, 2026
@matthyx
matthyx merged commit 0e11c46 into main Sep 15, 2026
9 checks passed
@matthyx
matthyx deleted the drop-legacy-backend-storage branch September 15, 2026 06:31
@matthyx matthyx moved this from WIP to To Archive in KS PRs tracking Sep 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

1 participant