package drain
import "k8s.io/kubectl/pkg/cmd/drain"
Index ¶
- func NewCmdCordon(f cmdutil.Factory, ioStreams genericiooptions.IOStreams) *cobra.Command
- func NewCmdDrain(f cmdutil.Factory, ioStreams genericiooptions.IOStreams) *cobra.Command
- func NewCmdUncordon(f cmdutil.Factory, ioStreams genericiooptions.IOStreams) *cobra.Command
- type DrainCmdOptions
- func NewDrainCmdOptions(f cmdutil.Factory, ioStreams genericiooptions.IOStreams) *DrainCmdOptions
- func (o *DrainCmdOptions) Complete(f cmdutil.Factory, cmd *cobra.Command, args []string) error
- func (o *DrainCmdOptions) RunCordonOrUncordon(desired bool) error
- func (o *DrainCmdOptions) RunDrain() error
Functions ¶
func NewCmdCordon ¶
func NewCmdDrain ¶
func NewCmdUncordon ¶
Types ¶
type DrainCmdOptions ¶
type DrainCmdOptions struct { PrintFlags *genericclioptions.PrintFlags ToPrinter func(string) (printers.ResourcePrinterFunc, error) Namespace string genericiooptions.IOStreams WarningPrinter *printers.WarningPrinter // contains filtered or unexported fields }
func NewDrainCmdOptions ¶
func NewDrainCmdOptions(f cmdutil.Factory, ioStreams genericiooptions.IOStreams) *DrainCmdOptions
func (*DrainCmdOptions) Complete ¶
Complete populates some fields from the factory, grabs command line arguments and looks up the node using Builder
func (*DrainCmdOptions) RunCordonOrUncordon ¶
func (o *DrainCmdOptions) RunCordonOrUncordon(desired bool) error
RunCordonOrUncordon runs either Cordon or Uncordon. The desired value for "Unschedulable" is passed as the first arg.
func (*DrainCmdOptions) RunDrain ¶
func (o *DrainCmdOptions) RunDrain() error
RunDrain runs the 'drain' command
Source Files ¶
drain.go
- Version
- v0.32.3 (latest)
- Published
- Mar 12, 2025
- Platform
- linux/amd64
- Imports
- 20 packages
- Last checked
- 5 days ago –
Tools for package owners.