Documentation ¶
Index ¶
- func NewErrorDrainIsLocked() error
- func NewErrorDrainTimeoutSecondsInvalid() error
- func NewErrorFailedToEvictAllPods() error
- func NewErrorInvalidLease() error
- func NewLease(name string, client client.LeaseInterface) *lease
- type Client
- type Config
- type ErrorDrainIsLocked
- type ErrorDrainTimeoutSecondsInvalid
- type ErrorFailedToEvictAllPods
- type ErrorInvalidLease
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewErrorDrainIsLocked ¶
func NewErrorDrainIsLocked() error
func NewErrorDrainTimeoutSecondsInvalid ¶ added in v1.5.0
func NewErrorDrainTimeoutSecondsInvalid() error
func NewErrorFailedToEvictAllPods ¶
func NewErrorFailedToEvictAllPods() error
func NewErrorInvalidLease ¶ added in v1.5.0
func NewErrorInvalidLease() error
func NewLease ¶ added in v1.5.0
func NewLease(name string, client client.LeaseInterface) *lease
Create a new lease instance. Does not create a lease on the kubernetes side.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func NewClient ¶
Create a new kubernetes client, defaults to in-cluster if no kubeconfig is provided
func NewFakeClient ¶
Create a test client with a fake kubernetes clientset
func (*Client) DrainNode ¶
Drain a node from all pods and set it to unschedulable. Status will be tracked in lease, only one drain will be run at a time.
func (*Client) FindNodeByZincatiID ¶
Find the node in the cluster with the matching machine id
type Config ¶ added in v1.5.0
type Config struct { Kubeconfig string `yaml:"kubeconfig,omitempty"` DrainTimeoutSeconds int32 `yaml:"drainTimeoutSeconds,omitempty"` DrainRetries int `yaml:"drainRetries,omitempty"` }
func NewDefaultConfig ¶ added in v1.5.0
func NewDefaultConfig() Config
type ErrorDrainIsLocked ¶
type ErrorDrainIsLocked struct{}
func (ErrorDrainIsLocked) Error ¶
func (e ErrorDrainIsLocked) Error() string
type ErrorDrainTimeoutSecondsInvalid ¶ added in v1.5.0
type ErrorDrainTimeoutSecondsInvalid struct{}
func (ErrorDrainTimeoutSecondsInvalid) Error ¶ added in v1.5.0
func (e ErrorDrainTimeoutSecondsInvalid) Error() string
type ErrorFailedToEvictAllPods ¶
type ErrorFailedToEvictAllPods struct{}
func (ErrorFailedToEvictAllPods) Error ¶
func (e ErrorFailedToEvictAllPods) Error() string
type ErrorInvalidLease ¶ added in v1.5.0
type ErrorInvalidLease struct{}
func (ErrorInvalidLease) Error ¶ added in v1.5.0
func (e ErrorInvalidLease) Error() string
Click to show internal directories.
Click to hide internal directories.