drain

package
v1.13.11-beta.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 19, 2019 License: Apache-2.0 Imports: 28 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EvictionKind        = "Eviction"
	EvictionSubresource = "pods/eviction"
)

Variables

This section is empty.

Functions

func NewCmdCordon

func NewCmdCordon(f cmdutil.Factory, ioStreams genericclioptions.IOStreams) *cobra.Command

func NewCmdDrain

func NewCmdDrain(f cmdutil.Factory, ioStreams genericclioptions.IOStreams) *cobra.Command

func NewCmdUncordon

func NewCmdUncordon(f cmdutil.Factory, ioStreams genericclioptions.IOStreams) *cobra.Command

func SupportEviction

func SupportEviction(clientset kubernetes.Interface) (string, error)

SupportEviction uses Discovery API to find out if the server support eviction subresource If support, it will return its groupVersion; Otherwise, it will return ""

Types

type DrainOptions

type DrainOptions struct {
	PrintFlags *genericclioptions.PrintFlags
	ToPrinter  func(string) (printers.ResourcePrinterFunc, error)

	Namespace string

	Force              bool
	DryRun             bool
	GracePeriodSeconds int
	IgnoreDaemonsets   bool
	Timeout            time.Duration
	DeleteLocalData    bool
	Selector           string
	PodSelector        string

	genericclioptions.IOStreams
	// contains filtered or unexported fields
}

func NewDrainOptions

func NewDrainOptions(f cmdutil.Factory, ioStreams genericclioptions.IOStreams) *DrainOptions

func (*DrainOptions) Complete

func (o *DrainOptions) Complete(f cmdutil.Factory, cmd *cobra.Command, args []string) error

Complete populates some fields from the factory, grabs command line arguments and looks up the node using Builder

func (*DrainOptions) RunCordonOrUncordon

func (o *DrainOptions) RunCordonOrUncordon(desired bool) error

RunCordonOrUncordon runs either Cordon or Uncordon. The desired value for "Unschedulable" is passed as the first arg.

func (*DrainOptions) RunDrain

func (o *DrainOptions) RunDrain() error

RunDrain runs the 'drain' command

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL