Skip to content

helm: sane resource defaults, NetworkPolicy template, pull-Always#261

Merged
zeevdr merged 1 commit into
mainfrom
220-helm-hardening
Apr 29, 2026
Merged

helm: sane resource defaults, NetworkPolicy template, pull-Always#261
zeevdr merged 1 commit into
mainfrom
220-helm-hardening

Conversation

@zeevdr
Copy link
Copy Markdown
Member

@zeevdr zeevdr commented Apr 29, 2026

Summary

  • Single replicas no longer ship with resources: {} — sane defaults (100m/128Mi requests, 1/512Mi limits) keep one pod from starving its node, with override + benchmarking guidance in the chart README.
  • imagePullPolicy defaults to Always so security-patch updates on a moving tag propagate without a manual rollout; production guidance is to pin by digest and flip back to IfNotPresent.
  • Optional NetworkPolicy template (networkPolicy.enabled, off by default in alpha) restricts ingress to the gRPC/HTTP ports and egress to configurable CIDRs for Postgres, Redis, JWKS, OTel + DNS.

Test plan

  • ./deploy/helm/decree/tests/template_test.sh — asserts default render contents, NetworkPolicy-enabled render, and helm lint clean
  • New CI job helm gated on deploy/helm/** paths runs the same script
  • helm lint clean

Closes #220

🤖 Generated with Claude Code

Pods previously shipped with `resources: {}` and `imagePullPolicy:
IfNotPresent`, so a single replica could starve its node and
security-patch updates on a moving tag never propagated. The chart
also had no NetworkPolicy, leaving egress wide open in multi-tenant
clusters.

- Default `requests: 100m/128Mi`, `limits: 1/512Mi`; documented as
  override-friendly for benchmarking and larger sizing.
- Default `imagePullPolicy: Always`; production guidance is to pin
  `image.tag` by digest and flip back to `IfNotPresent`.
- Add `networkPolicy.yaml` gated on `networkPolicy.enabled` (off by
  default during alpha). Allows ingress to gRPC/HTTP ports plus
  configurable egress CIDRs for PG, Redis, JWKS, OTel, and DNS.
- Add `tests/template_test.sh` asserting render contents + helm lint.
- Wire a `helm` job into CI gated on `deploy/helm/**` paths.

Closes #220.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@zeevdr zeevdr added this to the Security Review milestone Apr 29, 2026
@zeevdr zeevdr added enhancement New feature or request infra Docker, Helm, deployment size: S Quick win — a few hours or less priority: P1 Current milestone work labels Apr 29, 2026
@zeevdr zeevdr merged commit 53a1f88 into main Apr 29, 2026
20 checks passed
@zeevdr zeevdr deleted the 220-helm-hardening branch April 29, 2026 12:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request infra Docker, Helm, deployment priority: P1 Current milestone work size: S Quick win — a few hours or less

Projects

None yet

Development

Successfully merging this pull request may close these issues.

helm: default resource limits, NetworkPolicy, pull policy

1 participant