Directories
¶
| Path | Synopsis |
|---|---|
|
cmd
|
|
|
kubectl-investigate
command
kubectl-investigate is the kubectl plugin entry point.
|
kubectl-investigate is the kubectl plugin entry point. |
|
kubetective
command
kubetective is the full KubeTective CLI: investigate, replay, benchmark, doctor.
|
kubetective is the full KubeTective CLI: investigate, replay, benchmark, doctor. |
|
internal
|
|
|
action
Package action implements Phase 3/4 of the remediation model : deterministic preview actions and human-approved application, with audit records appended to the incident file.
|
Package action implements Phase 3/4 of the remediation model : deterministic preview actions and human-approved application, with audit records appended to the incident file. |
|
analyze
Package analyze defines the deterministic analyzer contract.
|
Package analyze defines the deterministic analyzer contract. |
|
analyze/configregression
Package configregression implements the config-regression analyzer: it links a change - a git commit touching the workload's manifests or a GitOps reconcile - to the incident onset and builds the "configuration regression" hypothesis.
|
Package configregression implements the config-regression analyzer: it links a change - a git commit touching the workload's manifests or a GitOps reconcile - to the incident onset and builds the "configuration regression" hypothesis. |
|
analyze/crashloop
Package crashloop implements the CrashLoopBackOff analyzer: it activates on container.waiting with reason CrashLoopBackOff (or repeated non-zero exits) and builds the "application crash loop" hypothesis.
|
Package crashloop implements the CrashLoopBackOff analyzer: it activates on container.waiting with reason CrashLoopBackOff (or repeated non-zero exits) and builds the "application crash loop" hypothesis. |
|
analyze/dns
Package dns implements the DNS-failure analyzer: workloads that crash or hang because they cannot resolve names - most commonly because coreDNS / kube-dns is down or the sandbox cannot be created (v0.7: the "why" for crashloops whose events smell of DNS).
|
Package dns implements the DNS-failure analyzer: workloads that crash or hang because they cannot resolve names - most commonly because coreDNS / kube-dns is down or the sandbox cannot be created (v0.7: the "why" for crashloops whose events smell of DNS). |
|
analyze/hpa
Package hpa implements the HorizontalPodAutoscaler analyzer: it activates on hpa.state observations and flags when the workload is pinned at maxReplicas - the capacity-ceiling context that amplifies per-pod failures.
|
Package hpa implements the HorizontalPodAutoscaler analyzer: it activates on hpa.state observations and flags when the workload is pinned at maxReplicas - the capacity-ceiling context that amplifies per-pod failures. |
|
analyze/imagepull
Package imagepull implements the image-pull-failure analyzer: it activates on container.waiting with reason ErrImagePull / ImagePullBackOff and builds the "image cannot be pulled" hypothesis.
|
Package imagepull implements the image-pull-failure analyzer: it activates on container.waiting with reason ErrImagePull / ImagePullBackOff and builds the "image cannot be pulled" hypothesis. |
|
analyze/nodepressure
Package nodepressure implements the node-pressure analyzer: it activates on node.condition observations (MemoryPressure/DiskPressure/PIDPressure) and builds the "node under pressure" hypothesis - the classic root cause that sits above per-pod symptoms.
|
Package nodepressure implements the node-pressure analyzer: it activates on node.condition observations (MemoryPressure/DiskPressure/PIDPressure) and builds the "node under pressure" hypothesis - the classic root cause that sits above per-pod symptoms. |
|
analyze/oom
Package oom implements the memory-exhaustion analyzer: it activates on container.terminated observations with reason OOMKilled, counts them, checks the configured memory limit, and builds the "memory exhaustion" hypothesis with explainable evidence.
|
Package oom implements the memory-exhaustion analyzer: it activates on container.terminated observations with reason OOMKilled, counts them, checks the configured memory limit, and builds the "memory exhaustion" hypothesis with explainable evidence. |
|
analyze/probe
Package probe implements the probe-failure analyzer: it activates on Unhealthy events (liveness/readiness probe failures) and builds the "probe failing" hypothesis - the most common cause of unnecessary restarts and traffic loss.
|
Package probe implements the probe-failure analyzer: it activates on Unhealthy events (liveness/readiness probe failures) and builds the "probe failing" hypothesis - the most common cause of unnecessary restarts and traffic loss. |
|
analyze/pvc
Package pvc implements the PersistentVolumeClaim analyzer: it activates on pvc.state observations and builds the "volume cannot bind" hypothesis when the claim is Pending/Lost or binding events report failures.
|
Package pvc implements the PersistentVolumeClaim analyzer: it activates on pvc.state observations and builds the "volume cannot bind" hypothesis when the claim is Pending/Lost or binding events report failures. |
|
analyze/scheduling
Package scheduling implements the unschedulable-pod analyzer: it activates on pod.state with phase Pending (or FailedScheduling events) and builds the "pod cannot be scheduled" hypothesis with the scheduler's message as the key evidence.
|
Package scheduling implements the unschedulable-pod analyzer: it activates on pod.state with phase Pending (or FailedScheduling events) and builds the "pod cannot be scheduled" hypothesis with the scheduler's message as the key evidence. |
|
analyze/service
Package service implements the service-endpoints analyzer: it activates on service.state observations and builds the "service has no ready endpoints" hypothesis - the 503 / selector-mismatch root cause.
|
Package service implements the service-endpoints analyzer: it activates on service.state observations and builds the "service has no ready endpoints" hypothesis - the 503 / selector-mismatch root cause. |
|
benchmark
Package benchmark implements the scenario benchmark gate: each scenario (scenarios/<name>/) carries a ground-truth spec (scenario.yaml) and a recorded investigation (record.jsonl).
|
Package benchmark implements the scenario benchmark gate: each scenario (scenarios/<name>/) carries a ground-truth spec (scenario.yaml) and a recorded investigation (record.jsonl). |
|
change
Package change implements the "what changed?" detector: it turns observations into ranked Change entries so an investigation can answer "what happened right before the incident?" with a relevance score per change.
|
Package change implements the "what changed?" detector: it turns observations into ranked Change entries so an investigation can answer "what happened right before the incident?" with a relevance score per change. |
|
cli
Package cli implements the kubetective / kubectl-investigate command line.
|
Package cli implements the kubetective / kubectl-investigate command line. |
|
collect
Package collect defines the collector boundary: raw data enters here and is normalized into Observations.
|
Package collect defines the collector boundary: raw data enters here and is normalized into Observations. |
|
collect/git
Package git implements the Git collector: it reads a local repository and emits git.commit observations for commits that touched manifests matching the investigation's target (workload name).
|
Package git implements the Git collector: it reads a local repository and emits git.commit observations for commits that touched manifests matching the investigation's target (workload name). |
|
collect/gitops
Package gitops implements the GitOps collector: it reads Flux Kustomization/HelmRelease and ArgoCD Application custom resources via the dynamic client and normalizes their sync/reconcile state into gitops.state observations - "what the GitOps controller thinks of the workload" .
|
Package gitops implements the GitOps collector: it reads Flux Kustomization/HelmRelease and ArgoCD Application custom resources via the dynamic client and normalizes their sync/reconcile state into gitops.state observations - "what the GitOps controller thinks of the workload" . |
|
collect/kubernetes
Package kubernetes implements the Kubernetes collector: it reads the cluster through the caller's kubeconfig identity (never escalating) and normalizes state, events, container statuses, node conditions, and (optionally) log tails into Observations.
|
Package kubernetes implements the Kubernetes collector: it reads the cluster through the caller's kubeconfig identity (never escalating) and normalizes state, events, container statuses, node conditions, and (optionally) log tails into Observations. |
|
collect/loki
Package loki implements the Loki log collector (v0.8): it serves the adaptive loop's log-evidence requests from a Grafana Loki instance instead of (or in addition to) direct pod-log access via kubectl, which is often restricted in hardened clusters.
|
Package loki implements the Loki log collector (v0.8): it serves the adaptive loop's log-evidence requests from a Grafana Loki instance instead of (or in addition to) direct pod-log access via kubectl, which is often restricted in hardened clusters. |
|
collect/prometheus
Package prometheus implements the Prometheus collector: it queries the Prometheus HTTP API (query_range) for per-container resource series over the investigation window and normalizes them into compact metric.series observations.
|
Package prometheus implements the Prometheus collector: it queries the Prometheus HTTP API (query_range) for per-container resource series over the investigation window and normalizes them into compact metric.series observations. |
|
config
Package config persists the small set of engine settings that calibration can adopt at runtime: currently the calibrated temperature, stored in ~/.kubetective/config.json so every CLI invocation (and the server/MCP modes) scores at the validated temperature.
|
Package config persists the small set of engine settings that calibration can adopt at runtime: currently the calibrated temperature, stored in ~/.kubetective/config.json so every CLI invocation (and the server/MCP modes) scores at the validated temperature. |
|
diag
Package diag implements `kubetective doctor` (issue #2, v1.0 checklist): a read-only environment preflight.
|
Package diag implements `kubetective doctor` (issue #2, v1.0 checklist): a read-only environment preflight. |
|
engine
Package engine orchestrates the investigation pipeline:
|
Package engine orchestrates the investigation pipeline: |
|
graph
Package graph builds the bounded in-memory evidence graph from normalized observations: typed edges (OWNS, RUNS_ON, CHANGED_BEFORE) that the investigation pipeline and the "what changed" ranking both consume .
|
Package graph builds the bounded in-memory evidence graph from normalized observations: typed edges (OWNS, RUNS_ON, CHANGED_BEFORE) that the investigation pipeline and the "what changed" ranking both consume . |
|
hypothesis
Package hypothesis implements the rule-based hypothesis engine: it dedups and merges analyzer-emitted candidates, reranks them, and applies deterministic status rules.
|
Package hypothesis implements the rule-based hypothesis engine: it dedups and merges analyzer-emitted candidates, reranks them, and applies deterministic status rules. |
|
llm
Package llm implements the optional LLM layer: a provider abstraction with an OpenAI-compatible adapter (OpenAI, Ollama, vLLM, llama.cpp), a redacted structured digest builder, and the constrained explainer.
|
Package llm implements the optional LLM layer: a provider abstraction with an OpenAI-compatible adapter (OpenAI, Ollama, vLLM, llama.cpp), a redacted structured digest builder, and the constrained explainer. |
|
memory
Package memory implements incident memory v1 ("seen this before?", roadmap v0.8): incidents are fingerprinted by the SET of observation kinds (the symptom + change shape), and similarity is ranked by Jaccard overlap between those sets.
|
Package memory implements incident memory v1 ("seen this before?", roadmap v0.8): incidents are fingerprinted by the SET of observation kinds (the symptom + change shape), and similarity is ranked by Jaccard overlap between those sets. |
|
model
Package model defines the core KubeTective data model: normalized observations, evidence, the evidence graph, timeline, hypotheses, and incident records.
|
Package model defines the core KubeTective data model: normalized observations, evidence, the evidence graph, timeline, hypotheses, and incident records. |
|
recommend
Package recommend implements the deterministic recommendation rule table: the top hypothesis's category maps to a risk-leveled, evidence-linked action (Phase 2, read-only).
|
Package recommend implements the deterministic recommendation rule table: the top hypothesis's category maps to a risk-leveled, evidence-linked action (Phase 2, read-only). |
|
record
Package record persists investigations as append-only JSONL incident records (one Observation per line) - the replay and benchmark substrate.
|
Package record persists investigations as append-only JSONL incident records (one Observation per line) - the replay and benchmark substrate. |
|
score
Package score implements the explainable scoring model:
|
Package score implements the explainable scoring model: |
|
server
Package server exposes KubeTective over HTTP (REST) and MCP (stdio) - v0.6 roadmap: "REST API + server mode, MCP server (thin wrapper)".
|
Package server exposes KubeTective over HTTP (REST) and MCP (stdio) - v0.6 roadmap: "REST API + server mode, MCP server (thin wrapper)". |
|
timeline
Package timeline merges observations into a deduplicated, time-sorted, anchored timeline.
|
Package timeline merges observations into a deduplicated, time-sorted, anchored timeline. |
|
pkg
|
|
|
api
Package api is the stable public KubeTective contract.
|
Package api is the stable public KubeTective contract. |
Click to show internal directories.
Click to hide internal directories.