Documentation ¶
Index ¶
- Constants
- func NewCmdCordon(f cmdutil.Factory, ioStreams genericclioptions.IOStreams) *cobra.Command
- func NewCmdDrain(f cmdutil.Factory, ioStreams genericclioptions.IOStreams) *cobra.Command
- func NewCmdUncordon(f cmdutil.Factory, ioStreams genericclioptions.IOStreams) *cobra.Command
- func SupportEviction(clientset kubernetes.Interface) (string, error)
- type DrainOptions
Constants ¶
View Source
const ( EvictionKind = "Eviction" EvictionSubresource = "pods/eviction" )
Variables ¶
This section is empty.
Functions ¶
func NewCmdCordon ¶
func NewCmdDrain ¶
func NewCmdUncordon ¶
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 ¶
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
Click to show internal directories.
Click to hide internal directories.