Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckDrift ¶
func EstimateCost ¶
Types ¶
type Diagnosis ¶
type Diagnosis struct {
RootCause string
Suggestion string
Explanation string
ConfidenceScore float64 // 0.0 to 1.0
}
Diagnosis represents the result of an analysis
type Evidence ¶
type Evidence struct {
Pod *corev1.Pod
Node *corev1.Node // Details of the node running the pod
Events []corev1.Event // Events related to the pod
NamespaceEvents []corev1.Event // Recent events in the namespace (for context)
Logs map[string]string // ContainerName -> Last N lines of logs
PreviousLogs map[string]string // ContainerName -> Last N lines of previous logs (if crashed)
ConfigWarnings []string // Missing ConfigMaps, Secrets, etc.
NetworkContext []string // Services, Endpoints status
ResourceInfo []string // QoS, Limits, OOMKilled history
ImageAnalysis []string // Tag validation, known vulnerabilities
SecurityAudit []string // ServiceAccount, SecurityContext
Availability []string // PDB status
ChangeDiff []string // Diff vs previous revision
IngressInfo []string // Ingress details
ScalingInfo []string // HPA details
StorageInfo []string // PVC details
SchedulingInfo []string // Taints/Affinity
LifecycleInfo []string // Hooks
ProbeInfo []string // Liveness/Readiness issues
SecretValidation []string // Content checks (trailing newlines)
MeshInfo []string // Sidecar status
InitExitInfo []string // Init container exit codes
OwnerChain []string // Hierarchy
NetPolicyInfo []string // Network Policies
CertInfo []string // Certificate expiration
QuotaInfo []string // ResourceQuotas
LogInsights []string // Pattern matching results
AffinityInfo []string // Node/Pod Affinity
PSAInfo []string // Pod Security Admission
SpreadInfo []string // Topology Spread
PriorityInfo []string // PriorityClass
FinalizerInfo []string // Finalizers
DNSInfo []string // CoreDNS status
NodeExtInfo []string // Kernel, Runtime, Pressure
SecurityExtInfo []string // Caps, Seccomp, AppArmor
VolumeExtInfo []string // HostPath, HugePages, DownwardAPI
ServiceExtInfo []string // Port mismatch, LB status
IngressExtInfo []string // TLS, Class
ConfigSyntaxInfo []string // JSON/YAML validation
PodStateExtInfo []string // Zombie, Backoff
ControllerExtInfo []string // Deployment strategy, CronJob
LocalDocs string // Content of local troubleshooting docs
SourceSnippets []Snippet // Code snippets linked from stack traces
Manifest string // YAML representation (optional)
}
Evidence collects all relevant data for analysis
func GatherEvidence ¶
func GatherEvidence(ctx context.Context, client kubernetes.Interface, namespace, podName string) (*Evidence, error)
GatherEvidence collects data from the cluster
type HeuristicAnalyzer ¶
type HeuristicAnalyzer struct{}
func NewHeuristicAnalyzer ¶
func NewHeuristicAnalyzer() *HeuristicAnalyzer
Click to show internal directories.
Click to hide internal directories.