Kubernetes Operators

KEDA Autoscaling & Git Branching Operators

Tharior Remedai leverages Kubernetes Custom Resource Definitions (CRDs) and specialized operators for dynamic pod scaling and Git branch lifecycle management.

1. KEDA Multi-Component Autoscaling Architecture

Tharior Remedai decouples into three specialized operational roles with custom KEDA autoscaling profiles:

2. Multi-Tenant Session Isolation & Memory Fences

Strict sandboxing ensures zero cross-session context overlap, memory leaks, or file disclosure:

POSIX 0700 Sandbox Fences

Each tenant session is allocated an isolated directory in /tmp/sandboxes/{tenant}_{user}_{session} with POSIX 0700 permission masks, strictly prohibiting unauthorized read/write access.

Zero-Disk-Leak Ephemeral Volumes

Ephemeral Kubernetes emptyDir scratchpads with automated lifecycle sweeps ensure all temporary files, AST traces, and git artifacts are completely wiped upon task completion.

75% Memory & CPU Fences

Pod resource managers enforce a strict 75% memory and CPU threshold, preserving 25% operational headroom for Python generational garbage collection and adaptive chunk size reduction.

K8s NetworkPolicy Boundaries

Workload NetworkPolicies restrict worker pod egress strictly to external LLM providers and VCS endpoints, blocking lateral pod-to-pod network traffic.

3. Git Branching Lifecycle Operator (`branch_operator.py`)

The Branch Operator enforces clean Git practices across all remediation pipelines:

Sanitized Branch Naming

Converts issue metadata into sanitized branch names conforming to standards: tharior/fix-{TICKET_ID}-{slug}.

Automated Trunk Rebase

Rebases remediation branches on the latest trunk HEAD prior to pull request generation to detect merge conflicts early.

Post-Merge Branch Pruning

Automatically prunes ephemeral branches from git repositories once pull requests are merged or closed.

4. Kubernetes Deployment Blueprints & Helm Chart

Manifests located in deploy/k8s/ and deploy/k8s/resilient-app/: