Skip to content

fix(helm): make KEDA hook Job resources configurable - #268

Open
modelpath-dev wants to merge 1 commit into
superlinked:mainfrom
modelpath-dev:fix/keda-hook-job-resources
Open

modelpath-dev wants to merge 1 commit into
superlinked:mainfrom
modelpath-dev:fix/keda-hook-job-resources

Conversation

@modelpath-dev

@modelpath-dev modelpath-dev commented Sep 11, 2026

Copy link
Copy Markdown

Summary

The keda-apply hook is OOMKilled at a hardcoded 256Mi on upgrade. Install skips the ownership jq path, so the same limit passes there. The chart had no values key for that Job, and Helm post-renderers do not patch hook manifests.

I added hooks.resources and wired it through keda-apply, keda-cleanup, and the KEDA ScaledObject/HPA gate. Default memory limit is 1Gi. Requests stay at 128Mi so scheduling does not get tighter. backoffLimit stays 0. A retry in the same memory limit does not fix this.

Closes #248

Compatibility

New values key with a chart default. Existing overlays keep working. The rendered hook memory limit changes from 256Mi to 1Gi. Clusters with a tighter LimitRange can set hooks.resources.limits.memory down.

Did not bump Chart.yaml. Release automation owns the version.

Test plan

  • helm lint --set payloadStore.enabled=false
  • helm template with default values and each of values-aws.yaml, values-gke.yaml, values-aks.yaml, values-ack.yaml
  • helm template with autoscaling.enabled=true shows 128Mi request and 1Gi limit on the three Jobs
  • --set hooks.resources.limits.memory=2Gi changes those Job limits only
  • helm package succeeds and Chart.lock is unchanged

Summary by CodeRabbit

  • New Features

    • Added configurable CPU and memory requests and limits for KEDA hook Jobs.
    • Applied shared resource settings to KEDA apply, cleanup, and readiness checks.
    • Added default resource values, including 128Mi memory requests and 1Gi memory limits.
  • Documentation

    • Documented how to size KEDA hook Jobs and customize their resources.
    • Added an example configuration for overriding the defaults.

Upgrade apply OOMs at the old 256Mi limit when kubectl plus jq load
live ScaledObjects. Expose hooks.resources and raise the default
limit to 1Gi while keeping the 128Mi request.

Co-authored-by: Cursor <cursoragent@cursor.com>
@coderabbitai

coderabbitai Bot commented Sep 11, 2026

Copy link
Copy Markdown

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: 859c3c23-6aa9-4bba-b723-e73a23b190d1

📥 Commits

Reviewing files that changed from the base of the PR and between d345bc0 and bf330fc.

📒 Files selected for processing (6)
  • deploy/helm/sie-cluster/README.md
  • deploy/helm/sie-cluster/templates/_helpers.tpl
  • deploy/helm/sie-cluster/templates/hooks/keda-ready-test.yaml
  • deploy/helm/sie-cluster/templates/keda-lifecycle.yaml
  • deploy/helm/sie-cluster/templates/keda-scaledobject.yaml
  • deploy/helm/sie-cluster/values.yaml

Included review availability: Your plan provides up to 8 included reviews per hour; 7 remain after this review.


📝 Walkthrough

Walkthrough

The Helm chart exposes shared CPU and memory settings for three KEDA hook Jobs. The Jobs render these settings through a common helper. The README documents the configuration and default values.

Changes

KEDA hook resource configuration

Layer / File(s) Summary
Resource values and rendering
deploy/helm/sie-cluster/values.yaml, deploy/helm/sie-cluster/templates/_helpers.tpl
Adds configurable CPU and memory requests and limits, then renders them through the shared sie-cluster.hooks.resources helper.
KEDA Job wiring and documentation
deploy/helm/sie-cluster/templates/keda-scaledobject.yaml, deploy/helm/sie-cluster/templates/keda-lifecycle.yaml, deploy/helm/sie-cluster/templates/hooks/keda-ready-test.yaml, deploy/helm/sie-cluster/README.md
Applies the shared resources to the KEDA apply, cleanup, and readiness test Jobs. Documents the configuration and defaults.

Suggested reviewers: mamayer19

Priority: ➖ Normal

Severity of issue fixed: Medium

Merge Risk: ⚪ Minimal · up to bf330

The configurable KEDA hook resources are consistent across values, rendering, Job consumers, and documentation.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Issue #248 requests configurable resources for the kubectl-based KEDA hook Jobs. The chart adds top-level hooks.resources defaults with 128Mi memory requests and a 1Gi memory limit. `keda-scaledobje…
Out of Scope Changes check ✅ Passed The changes stay within issue #248. The helper centralizes resource rendering, the README documents the new values, and the three Job templates consume the shared configuration. These changes directly…
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…
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: making KEDA hook Job resources configurable in the Helm chart.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

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.

sie-cluster: keda-apply hook is OOMKilled at its hardcoded 256Mi limit on every upgrade, and the limit is not configurable

2 participants