Versions in this module Expand all Collapse all v0 v0.1.1 Sep 16, 2024 v0.1.0 Sep 4, 2024 Changes in this version + var ErrDrainRequestExists = errors.New("drain request exists") + func DrainRequestUIDFromNodeMaintenance(nm *maintenancev1.NodeMaintenance) string + type DrainRequest interface + CancelDrain func() + LastError func() error + Spec func() DrainRequestSpec + StartDrain func() + State func() DrainState + Status func() (DrainStatus, error) + UID func() string + func NewDrainRequest(ctx context.Context, log logr.Logger, k8sInterface kubernetes.Interface, ...) DrainRequest + type DrainRequestSpec struct + NodeName string + Spec maintenancev1.DrainSpec + type DrainState string + const DrainDeleted + const DrainEvicted + const DrainStateCanceled + const DrainStateError + const DrainStateInProgress + const DrainStateNotStarted + const DrainStateSuccess + type DrainStatus struct + PodsToDelete []string + State DrainState + type Manager interface + AddRequest func(req DrainRequest) error + GetRequest func(uid string) DrainRequest + ListRequests func() []DrainRequest + NewDrainRequest func(*maintenancev1.NodeMaintenance) DrainRequest + RemoveRequest func(uid string) + func NewManager(log logr.Logger, ctx context.Context, kInterface kubernetes.Interface) Manager