feat(server): add Kubernetes Helm chart for server deployment #1085

Merged
brent.edwards merged 3 commits from feat/k8s-helm-deployment into master 2026-03-27 23:53:23 +00:00

3 Commits

Author SHA1 Message Date
brent.edwards 6d1925abbe test(server): normalize CLI error assertion output
CI / benchmark-publish (pull_request) Has been skipped
CI / build (pull_request) Successful in 23s
CI / helm (pull_request) Successful in 36s
CI / quality (pull_request) Successful in 50s
CI / lint (pull_request) Successful in 3m31s
CI / typecheck (pull_request) Successful in 4m13s
CI / security (pull_request) Successful in 4m33s
CI / unit_tests (pull_request) Successful in 6m4s
CI / docker (pull_request) Successful in 1m22s
CI / integration_tests (pull_request) Successful in 9m2s
CI / e2e_tests (pull_request) Successful in 11m46s
CI / coverage (pull_request) Successful in 11m44s
CI / status-check (pull_request) Successful in 1s
CI / benchmark-regression (pull_request) Successful in 57m20s
Strip ANSI escape sequences before matching Typer validation text so server_serve invalid log-level checks pass consistently in colored CI output.
2026-03-27 23:14:05 +00:00
brent.edwards 9d16d49789 fix(server): address review feedback and security scan stability
Make server CLI imports safe for CLI-only installs by handling missing uvicorn at runtime, and replace click-based log-level validation with a Typer callback plus coverage for invalid/normalized values. Isolate Docker ignore scope by introducing Dockerfile.server.dockerignore so server-only exclusions do not affect the default CLI image build, and add dedicated BDD checks for this behavior.

Also stabilize nox security_scan on Python 3.13 by pinning setuptools<81 for Semgrep's pkg_resources dependency and remove the unreachable lifespan return flagged by vulture.

ISSUES CLOSED: #928
2026-03-27 23:14:05 +00:00
brent.edwards ec322c58d7 feat(server): add Kubernetes Helm chart for server deployment
Adds the Kubernetes/Helm deployment bundle for server mode with a
hardened Deployment, Service, optional TLS Ingress, configuration/secrets
wiring, Dockerfile.server packaging, and deployment documentation for
ticket #928.

Key components:
- Helm chart under k8s/ with Deployment, Service, optional Ingress,
  ConfigMap, ServiceAccount, Secrets, NOTES, and optional Redis subchart.
- Multi-stage Dockerfile.server for server runtime deployment.
- Deployment-focused docs in k8s/README.md.
- Behave + Robot + benchmark coverage for chart/deployment wiring.

Review fixes applied:
- Rebased branch onto master (removed merge commit per rebase-only policy).
- Moved uvicorn import to module top level per Import Guidelines.
- Added SHA256 checksum verification for Helm binary downloads in CI.
- Added 405 Method Not Allowed for wrong methods on known ASGI paths.
- Fixed WebSocket close: consume connect event first, use code 1008.
- Added logging for unrecognised lifespan message types.
- Added security-hardening headers (content-length, x-content-type-options,
  cache-control) to all ASGI HTTP responses.
- Constrained --log-level to valid uvicorn levels via click.Choice.
- Added Dockerfile.server build step to CI docker job.
- Standardised Dockerfile.server base image to python:3.13-slim.
- Split Dockerfile build tool install into separate layer for caching.
- Added credential file patterns to .dockerignore.
- Reverted unrelated semgrep pre-commit config change.
- Removed unused ReceiveCallable type alias from test steps.
- Fixed redundant shutil.which check in _render_chart helper.
- Improved deque error message in lifespan test receive mock.
- Updated test assertions for WebSocket close code 1008.
- Added BDD scenario for POST-to-known-path 405 response.

ISSUES CLOSED: #928
2026-03-27 23:14:05 +00:00