feat(k8s): namespace-per-deployment for resource isolation and cleanup #988

Merged
AFDudley merged 1 commits from feat-namespace-per-deployment into main 2026-02-03 23:09:17 +00:00
Owner

Each deployment now gets its own Kubernetes namespace (laconic-{deployment_id}).
This provides:

  • Resource isolation between deployments on the same cluster
  • Simplified cleanup: deleting the namespace cascades to all namespaced resources
  • No orphaned resources possible when deployment IDs change

Changes:

  • Set k8s_namespace based on deployment name in init
  • Add _ensure_namespace() to create namespace before deploying resources
  • Add _delete_namespace() for cleanup
  • Simplify down() to just delete PVs (cluster-scoped) and the namespace
  • Fix hardcoded "default" namespace in logs function

Co-Authored-By: Claude Opus 4.5 noreply@anthropic.com

Each deployment now gets its own Kubernetes namespace (laconic-{deployment_id}). This provides: - Resource isolation between deployments on the same cluster - Simplified cleanup: deleting the namespace cascades to all namespaced resources - No orphaned resources possible when deployment IDs change Changes: - Set k8s_namespace based on deployment name in __init__ - Add _ensure_namespace() to create namespace before deploying resources - Add _delete_namespace() for cleanup - Simplify down() to just delete PVs (cluster-scoped) and the namespace - Fix hardcoded "default" namespace in logs function Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
AFDudley force-pushed feat-namespace-per-deployment from 5e7cf8415a to d913926144 2026-02-03 23:04:59 +00:00 Compare
AFDudley merged commit 0296da6f64 into main 2026-02-03 23:09:17 +00:00
Sign in to join this conversation.
No reviewers
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: cerc-io/stack-orchestrator#988
No description provided.