Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func New ¶
func New(streams genericclioptions.IOStreams) *cobra.Command
New returns the cobra command for `kubectl datadog autoscaling cluster evict-legacy-nodes`.
func Run ¶
func Run(ctx context.Context, streams genericclioptions.IOStreams, configFlags *genericclioptions.ConfigFlags, clientset *kubernetes.Clientset, opts RunOptions) error
Run is the orchestrator entry point. Idempotent: a second invocation on a cluster already migrated returns success without changes. Crash-safe: a killed run leaves no permanently corrupting state — re-running cleans up.
Types ¶
type AutoscalingAPI ¶
type AutoscalingAPI interface {
UpdateAutoScalingGroup(ctx context.Context, in *autoscaling.UpdateAutoScalingGroupInput, opts ...func(*autoscaling.Options)) (*autoscaling.UpdateAutoScalingGroupOutput, error)
SuspendProcesses(ctx context.Context, in *autoscaling.SuspendProcessesInput, opts ...func(*autoscaling.Options)) (*autoscaling.SuspendProcessesOutput, error)
TerminateInstanceInAutoScalingGroup(ctx context.Context, in *autoscaling.TerminateInstanceInAutoScalingGroupInput, opts ...func(*autoscaling.Options)) (*autoscaling.TerminateInstanceInAutoScalingGroupOutput, error)
}
type EC2API ¶
type EC2API interface {
TerminateInstances(ctx context.Context, in *ec2.TerminateInstancesInput, opts ...func(*ec2.Options)) (*ec2.TerminateInstancesOutput, error)
}
type EKSManagedNodeGroupAPI ¶
type EKSManagedNodeGroupAPI interface {
UpdateNodegroupConfig(ctx context.Context, in *eks.UpdateNodegroupConfigInput, opts ...func(*eks.Options)) (*eks.UpdateNodegroupConfigOutput, error)
}
type RunOptions ¶
type Target ¶
type Target struct {
Manager clusterinfo.NodeManager
Entity string
Nodes []string
}
Target identifies a single node-management entity to evict. The Entity field is the bucket name within `ClusterInfo.NodeManagement[Manager]` — an ASG name, an EKS managed node group name, a Karpenter NodePool name, or the empty string for the standalone bucket.
func BuildPlan ¶
func BuildPlan(info *clusterinfo.ClusterInfo, all bool, specs []Target) ([]Target, error)
func ParseTargetSpec ¶
ParseTargetSpec parses a CLI `--target` value into a Target with an empty Nodes slice (Nodes are filled in by BuildPlan from the cluster snapshot).
Format: `