Skip to content

feat(k8s): kubernetes dynamic informer architecture, event streaming & subprocess elimination research #307

Description

@dan-petty

Context & Rationale

Existing Kubernetes subcommands rely heavily on CLI kubectl subprocess invocations and fragmented synchronous calls, incurring high process spawning overhead and rigid error handling.

Scope & Deliverables

  • Context & Rationale*: Existing Kubernetes subcommands rely heavily on CLI kubectl subprocess invocations and fragmented synchronous calls, incurring high process spawning overhead and rigid error handling.
  • Deep Integration & Functional Extension*: Integrate the official Python kubernetes client's asynchronous dynamic client, Informer watchers, and WebSocket streaming protocols to stream cluster events, pod status transitions, and container logs directly into in-memory queues without spawning external binaries.
  • Code Optimization & Performance Acceleration*: Reduce Kubernetes status and pod polling latency from ~250ms per invocation to <10ms in-memory async I/O; implement client-side typed response caching with bounded TTLs; eliminate redundant JSON parsing of kubectl get -o json outputs.
  • Refactoring Potential & Legacy Elimination*: Refactor src/devops_cli/commands/k8s/ and runtime modules into a consolidated KubernetesService protocol; deprecate bespoke regex output scrubbers and procedural subprocess wrappers; ensure full POSIX process group isolation across any remaining external tools.

Strategic Alignment

  • Milestone: v0.2.22 (Deep Subsystem Integration, Architectural Optimization & Extensible Refactoring)
  • Roadmap Reference: docs/ROADMAP.md

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    priority/p0-criticalUrgent blockages, critical vulnerabilities, or release blockersscope/k8sKubernetes commands, Helm charts, pods, services, and policiestype/featureNew user-facing functionality or capability addition

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions