Documentation
¶
Index ¶
- func GetKubernetesClient() (kubernetes.Interface, error)
- type Decision
- type HealthChecker
- func (hc *HealthChecker) CheckClusterCapacity(ctx context.Context, clusterName string) HealthResult
- func (hc *HealthChecker) CheckCriticalWorkloads(ctx context.Context) HealthResult
- func (hc *HealthChecker) CheckNodeHealth(ctx context.Context, clusterName string) HealthResult
- func (hc *HealthChecker) CheckPodDisruptionBudgets(ctx context.Context) HealthResult
- func (hc *HealthChecker) CheckResourceBalance(ctx context.Context, clusterName string) HealthResult
- func (hc *HealthChecker) RunAllChecks(ctx context.Context, clusterName string) HealthSummary
- type HealthResult
- type HealthStatus
- type HealthSummary
- type InstanceData
- type NodeMetrics
- type ResourceAnalysis
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetKubernetesClient ¶
func GetKubernetesClient() (kubernetes.Interface, error)
GetKubernetesClient creates a Kubernetes client from kubeconfig
Types ¶
type Decision ¶
type Decision string
Decision represents the overall decision for proceeding with update
type HealthChecker ¶
type HealthChecker struct {
// contains filtered or unexported fields
}
HealthChecker performs various health checks on the EKS cluster
func NewChecker ¶
func NewChecker(eksClient *eks.Client, k8sClient kubernetes.Interface, cwClient *cloudwatch.Client, asgClient *autoscaling.Client) *HealthChecker
NewChecker creates a new health checker instance
func (*HealthChecker) CheckClusterCapacity ¶
func (hc *HealthChecker) CheckClusterCapacity(ctx context.Context, clusterName string) HealthResult
CheckClusterCapacity validates that the cluster has sufficient capacity for rolling updates
func (*HealthChecker) CheckCriticalWorkloads ¶
func (hc *HealthChecker) CheckCriticalWorkloads(ctx context.Context) HealthResult
CheckCriticalWorkloads validates that critical system workloads are running
func (*HealthChecker) CheckNodeHealth ¶
func (hc *HealthChecker) CheckNodeHealth(ctx context.Context, clusterName string) HealthResult
CheckNodeHealth validates that all nodes in the cluster are ready
func (*HealthChecker) CheckPodDisruptionBudgets ¶
func (hc *HealthChecker) CheckPodDisruptionBudgets(ctx context.Context) HealthResult
CheckPodDisruptionBudgets validates PDB configuration for user workloads
func (*HealthChecker) CheckResourceBalance ¶
func (hc *HealthChecker) CheckResourceBalance(ctx context.Context, clusterName string) HealthResult
CheckResourceBalance validates resource distribution and utilization patterns
func (*HealthChecker) RunAllChecks ¶
func (hc *HealthChecker) RunAllChecks(ctx context.Context, clusterName string) HealthSummary
RunAllChecks executes all health checks and returns a summary
type HealthResult ¶
type HealthResult struct {
Name string
Status HealthStatus
Score int // 0-100
Message string
Details []string
IsBlocking bool
}
HealthResult represents the result of a single health check
type HealthStatus ¶
type HealthStatus string
HealthStatus represents the status of a health check
const ( StatusPass HealthStatus = "PASS" StatusWarn HealthStatus = "WARN" StatusFail HealthStatus = "FAIL" )
type HealthSummary ¶
type HealthSummary struct {
Results []HealthResult
OverallScore int
Decision Decision
Warnings []string
Errors []string
}
HealthSummary represents the overall health check results
type InstanceData ¶
InstanceData represents an EC2 instance with its associated node name
type NodeMetrics ¶
NodeMetrics represents resource metrics for a single node