Skip to content

SMOODEV-1965: smooai-next chart — optional hpa.memoryTarget for memory scale-out#9

Merged
brentrager merged 1 commit into
mainfrom
SMOODEV-1965-hpa-memory-target
Jun 20, 2026
Merged

SMOODEV-1965: smooai-next chart — optional hpa.memoryTarget for memory scale-out#9
brentrager merged 1 commit into
mainfrom
SMOODEV-1965-hpa-memory-target

Conversation

@brentrager

Copy link
Copy Markdown
Contributor

Why

Follow-up to SMOODEV-1964 (smooai-web OOM). The chart's templates/hpa.yaml hardcoded a single CPU Resource metric, so a memory-pressured Next.js workload had no way to scale out — it rode individual pods into a V8 heap-limit OOM. The 1964 hotfix raised the per-pod memory ceiling; this gives the autoscaler a memory signal too.

What

  • New optional hpa.memoryTarget value. When set (e.g. 80), the HPA gets a second memory Resource metric (averageUtilization as a % of the memory request).
  • Default 0 = CPU-only, fully backward-compatible — rendered output is byte-identical for existing consumers (verified via helm template).
  • Chart bumped 0.2.1 → 0.2.2.

The HPA scales up when either cpu or memory is hot, and down only when both are cool — so the consumer must set memoryTarget comfortably above steady-state mem-used ÷ mem-request or it pins at max (documented in values.yaml).

Verification

  • helm lint passes.
  • helm template with default → CPU-only metric (unchanged).
  • helm template --set hpa.memoryTarget=80 → both cpu (70) + memory (80) metrics.

Next

After merge + chart publish (release workflow_dispatch), smooai consumes 0.2.2 and sets hpa.memoryTarget: 80 in k8s/charts/web.ts (separate PR in the smooai monorepo).

🤖 Generated with Claude Code

…y scale-out

The chart's HPA hardcoded a single CPU Resource metric, so memory-pressured
Next.js workloads (smooai-web) had no way to scale out — they rode individual
pods into a V8 heap-limit OOM (SMOODEV-1964). Add an optional hpa.memoryTarget
value that appends a second memory Resource metric (averageUtilization % of the
memory request). Default 0 = CPU-only, fully backward-compatible (rendered output
unchanged for existing consumers). Chart bumped 0.2.1 -> 0.2.2.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@changeset-bot

changeset-bot Bot commented Jun 20, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 9dc36ff

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@brentrager brentrager merged commit 8cc362f into main Jun 20, 2026
2 checks passed
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.

1 participant