Skip to content

Feat/add priorityclassname deployments#809

Merged
matthyx merged 2 commits intomainfrom
feat/add-priorityclassname-deployments
Apr 2, 2026
Merged

Feat/add priorityclassname deployments#809
matthyx merged 2 commits intomainfrom
feat/add-priorityclassname-deployments

Conversation

@matthyx
Copy link
Copy Markdown
Contributor

@matthyx matthyx commented Apr 2, 2026

replacing #804

Summary by CodeRabbit

  • New Features
    • Added priority class scheduling configuration for all Kubescape Operator components. Users can now set priority classes globally via customScheduling.priorityClassName or override per-component (kubescape, operator, kubevuln, storage, synchronizer, node-agent, and others) via new Helm chart values, enabling fine-grained control over pod scheduling priorities.

bl4ko and others added 2 commits April 2, 2026 11:58
Add optional priorityClassName to all 5 Deployment workloads (kubescape,
kubevuln, operator, prometheus-exporter, storage) using a shared helper
template with customScheduling fallback, consistent with the existing
nodeSelector/affinity/tolerations pattern.

Signed-off-by: bl4ko <gasperoblak@bl4ko.com>
…rage

Signed-off-by: Matthias Bertschy <matthias.bertschy@gmail.com>
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 2, 2026

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 472d2a3d-c781-42a3-9200-5c38e9c18b28

📥 Commits

Reviewing files that changed from the base of the PR and between 541cb73 and 8255a9c.

⛔ Files ignored due to path filters (1)
  • charts/kubescape-operator/tests/__snapshot__/snapshot_test.yaml.snap is excluded by !**/*.snap
📒 Files selected for processing (14)
  • charts/kubescape-operator/templates/_helpers.tpl
  • charts/kubescape-operator/templates/autoupdater/cronjob.yaml
  • charts/kubescape-operator/templates/grype-offline-db/cronjob.yaml
  • charts/kubescape-operator/templates/kubescape-scheduler/cronjob.yaml
  • charts/kubescape-operator/templates/kubescape/deployment.yaml
  • charts/kubescape-operator/templates/kubevuln-scheduler/cronjob.yaml
  • charts/kubescape-operator/templates/kubevuln/deployment.yaml
  • charts/kubescape-operator/templates/node-agent/_node-agent.tpl
  • charts/kubescape-operator/templates/operator/deployment.yaml
  • charts/kubescape-operator/templates/prometheus-exporter/deployment.yaml
  • charts/kubescape-operator/templates/storage/deployment.yaml
  • charts/kubescape-operator/templates/synchronizer/deployment.yaml
  • charts/kubescape-operator/tests/snapshot_test.yaml
  • charts/kubescape-operator/values.yaml

📝 Walkthrough

Walkthrough

The pull request introduces priorityClassName scheduling support to the kubescape-operator Helm chart by adding a reusable helper template function and integrating it across multiple component deployments and cronjobs, along with corresponding configuration values.

Changes

Cohort / File(s) Summary
Helper Template
charts/kubescape-operator/templates/_helpers.tpl
Adds new kubescape-operator.priorityClassName template function that conditionally renders the priorityClassName field, falling back from component.priorityClassName to global.priorityClassName.
Component Templates
charts/kubescape-operator/templates/{autoupdater,grype-offline-db,kubescape-scheduler,kubescape,kubevuln-scheduler,kubevuln,operator,prometheus-exporter,storage,synchronizer}/…, charts/kubescape-operator/templates/node-agent/_node-agent.tpl
Integrates the priorityClassName helper into pod specs across 10 component templates; node-agent template additionally updates logic to check nodeAgent.priorityClassName with fallback to legacy configurations.priorityClass.enabled behavior and customScheduling.priorityClassName.
Configuration Values
charts/kubescape-operator/values.yaml
Adds priorityClassName: "" entries to 12 component configuration blocks (customScheduling, kubescape, operator, kubevuln, storage, nodeAgent, synchronizer, grypeOfflineDB, prometheusExporter, helmReleaseUpgrader, kubescapeScheduler, kubevulnScheduler); updates comment for configurations.priorityClass.daemonset.
Test
charts/kubescape-operator/tests/snapshot_test.yaml
Adds new snapshot test case it: priority class scheduling that asserts multi-level priorityClassName override behavior with customScheduling, component-level, and nodeAgent overrides.

Poem

With whiskers twitching, a rabbit designs,
Priority classes in template lines,
From cronjobs dancing to deployments grand,
Scheduling magic throughout the land! 🐰✨

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/add-priorityclassname-deployments

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 and usage tips.

@matthyx matthyx merged commit bebb33c into main Apr 2, 2026
8 of 9 checks passed
@matthyx matthyx deleted the feat/add-priorityclassname-deployments branch April 2, 2026 10:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants